brian2 package¶
Brian 2
Functions
check_cache (target) |
clear_cache (target) |
Clears the on-disk cache with the compiled files for a given code generation target. |
hears
module¶
This is only a bridge for using Brian 1 hears with Brian 2.
NOTES:
- Slicing sounds with Brian 2 units doesn’t work, you need to either use Brian 1 units or replace calls to
sound[:20*ms]
withsound.slice(None, 20*ms)
, etc.
TODO: handle properties (e.g. sound.duration)
Not working examples:
- time_varying_filter1 (care with units)
Exported members:
convert_unit_b1_to_b2
, convert_unit_b2_to_b1
Classes
BridgeSound |
We add a new method slice because slicing with units can’t work with Brian 2 units. |
FilterbankGroup (filterbank, targetvar, …) |
Methods |
Sound |
alias of brian2.hears.BridgeSound |
WrappedSound |
alias of brian2.hears.new_class |
Functions
convert_unit_b1_to_b2 (val) |
convert_unit_b2_to_b1 (val) |
modify_arg (arg) |
Modify arguments to make them compatible with Brian 1. |
wrap_units (f) |
Wrap a function to convert units into a form that Brian 1 can handle. |
wrap_units_class (_C) |
Wrap a class to convert units into a form that Brian 1 can handle in all methods |
wrap_units_property (p) |
numpy_
module¶
A dummy package to allow importing numpy and the unit-aware replacements of numpy functions without having to know which functions are overwritten.
This can be used for example as import brian2.numpy_ as np
Exported members:
add_newdocs
, ModuleDeprecationWarning
, VisibleDeprecationWarning
, __version__
, pkgload()
, PackageLoader
, show_config()
, char
, rec
, memmap
, newaxis
, ndarray
, flatiter
, nditer
, nested_iters
, ufunc
, arange()
, array
, zeros
, count_nonzero()
, empty
, broadcast
, dtype
, fromstring
, fromfile
… (625 more members)
only
module¶
A dummy package to allow wildcard import from brian2 without also importing the pylab (numpy + matplotlib) namespace.
Usage: from brian2.only import *
Exported members:
get_logger()
, BrianLogger
, std_silent
, Trackable
, Nameable
, SpikeSource
, linked_var()
, DEFAULT_FUNCTIONS
, Function
, implementation()
, declare_types()
, PreferenceError
, BrianPreference
, prefs
, brian_prefs
, Clock
, defaultclock
, Equations
, Expression
, Statements
, BrianObject
, BrianObjectException
, Network
, profiling_summary()
, scheduling_summary()
… (302 more members)
Functions
restore_initial_state () |
Restores internal Brian variables to the state they are in when Brian is imported |