NumpyCodeObject class

(Shortest import: from brian2 import NumpyCodeObject)

class brian2.codegen.runtime.numpy_rt.numpy_rt.NumpyCodeObject(*args, **kw)[source]

Bases: CodeObject

Execute code using Numpy

Default for Brian because it works on all platforms.

Methods

compile_block(block)

is_available()

Whether this target for code generation is available.

run_block(block)

update_namespace()

Update the namespace for this timestep.

variables_to_namespace()

Details

compile_block(block)[source]
classmethod is_available()[source]

Whether this target for code generation is available. Should use a minimal example to check whether code generation works in general.

run_block(block)[source]
update_namespace()[source]

Update the namespace for this timestep. Should only deal with variables where the reference changes every timestep, i.e. where the current reference in namespace is not correct.

variables_to_namespace()[source]