brainunit.have_same_dim#
- brainunit.have_same_dim(obj1, obj2)[source]#
Test if two values have the same dimensions.
- Parameters:
- Returns:
same –
Trueif obj1 and obj2 have the same dimensions.- Return type:
See also
has_same_unitCheck whether two objects share the same unit.
Examples
>>> import saiunit as u >>> u.have_same_dim(1.0 * u.mV, 2.0 * u.volt) True >>> u.have_same_dim(1.0 * u.mV, 2.0 * u.second) False >>> u.have_same_dim(1.0, 2.0) True