reinit_devices function

(Shortest import: from brian2.devices import reinit_devices)


Reinitialize all devices, call Device.activate again 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), calling device.reinit() followed by device.activate() should normally be sufficient.


This also resets the defaultclock, i.e. a non-standard dt has to be set again.