DiffEqSingleState

DiffEqSingleState#

class braincell.quad.DiffEqSingleState(value, name=None, **kwargs)#

An integrable hidden state with no trailing state axis.

This is the state class used by every hidden variable owned by a braincell.SingleCompartment, which has no spatial axis: one value per element of varshape, and nothing to group.

See also

DiffEqGroupState

The grouped counterpart used by Cell.

state

Host-scoped factory that picks between the two.

Examples

>>> import brainunit as u
>>> import numpy as np
>>> import braincell
>>> st = braincell.DiffEqSingleState(np.zeros(4) * u.mV)
>>> st.varshape
(4,)
>>> isinstance(st, braincell.DiffEqState)
True