RuntimeDevice class¶
(Shortest import: from brian2.devices import RuntimeDevice)
-
class
brian2.devices.device.RuntimeDevice[source]¶ Bases:
brian2.devices.device.DeviceThe default device used in Brian, state variables are stored as numpy arrays in memory.
Attributes
arraysMapping from Variableobjects to numpy arrays (orDynamicArrayobjects).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
Variableobjects to numpy arrays (orDynamicArrayobjects). Arrays in this dictionary will disappear as soon as the last reference to theVariableobject used as a key is gone
-