get_dtype function

(Shortest import: from brian2.groups.group import get_dtype)

brian2.groups.group.get_dtype(equation, dtype=None)[source]

Helper function to interpret the dtype keyword argument in NeuronGroup etc.

Parameters:

equation : SingleEquation

The equation for which a dtype should be returned

dtype : dtype or dict, optional

Either the dtype to be used as a default dtype for all float variables (instead of the core.default_float_dtype preference) or a dictionary stating the dtype for some variables; all other variables will use the preference default

Returns:

d : dtype

The dtype for the variable defined in equation