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 (or DynamicArray 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)
init_with_array(var, arr)
init_with_zeros(var)
resize(var, new_size)
resize_along_first(var, new_size)
set_value(var, value)
spike_queue(source_start, source_end)

Details

arrays

Mapping from Variable objects to numpy arrays (or DynamicArray objects). Arrays in this dictionary will disappear as soon as the last reference to the Variable object used as a key is gone

add_array(var)[source]
fill_with_array(var, arr)[source]
get_array_name(var, access_data=True)[source]
get_value(var, access_data=True)[source]
init_with_arange(var, start)[source]
init_with_array(var, arr)[source]
init_with_zeros(var)[source]
resize(var, new_size)[source]
resize_along_first(var, new_size)[source]
set_value(var, value)[source]
spike_queue(source_start, source_end)[source]