device_override function

(Shortest import: from brian2.core.base import device_override)

brian2.core.base.device_override(name)[source]

Decorates a function/method to allow it to be overridden by the current Device.

The name is the function name in the Device to use as an override if it exists.

The returned function has an additional attribute original_function which is a reference to the original, undecorated function.