have_same_dimensions function

(Shortest import: from brian2 import have_same_dimensions)

brian2.units.fundamentalunits.have_same_dimensions(obj1, obj2)[source]

Test if two values have the same dimensions.

Parameters:

obj1, obj2 : {Quantity, array-like, number}

The values of which to compare the dimensions.

Returns:

same : bool

True if obj1 and obj2 have the same dimensions.