reinit_devices function¶
(Shortest import: from brian2.devices import reinit_devices)
- brian2.devices.device.reinit_devices()[source]¶
Reinitialize all devices, call
Device.activateagain on the current device and reset the preferences. Used as a “teardown” function in testing, if users want to reset their device (e.g. for multiple standalone runs in a single script), callingdevice.reinit()followed bydevice.activate()should normally be sufficient.Notes
This also resets the
defaultclock, i.e. a non-standarddthas to be set again.