get_unit function

(Shortest import: from brian2 import get_unit)

brian2.units.fundamentalunits.get_unit(x, *regs)[source]

Find the most appropriate consistent unit from the unit registries.

Parameters:

x : {Quantity, array-like, number}

The value to find a unit for.

Returns:

q : Unit

The equivalent Unit for the quantity x.