RuntimeDevice class¶
(Shortest import: from brian2.devices import RuntimeDevice)
-
class
brian2.devices.device.
RuntimeDevice
[source]¶ Bases:
brian2.devices.device.Device
The default device used in Brian, state variables are stored as numpy arrays in memory.
Attributes
arrays
Mapping from Variable
objects to numpy arrays (orDynamicArray
objects).Methods
add_array
(var)fill_with_array
(var, arr)get_array_name
(var[, access_data])get_value
(var[, access_data])init_with_arange
(var, start, dtype)init_with_zeros
(var, dtype)resize
(var, new_size)resize_along_first
(var, new_size)seed
([seed])Set the seed for the random number generator. set_value
(var, value)spike_queue
(source_start, source_end)Details
-
arrays
¶ Mapping from
Variable
objects to numpy arrays (orDynamicArray
objects). Arrays in this dictionary will disappear as soon as the last reference to theVariable
object used as a key is gone
-