is_quantity#
- class brainunit.math.is_quantity(x)[source]#
Check whether x is a
Quantityinstance.- Parameters:
x (
Any) – The object to test.- Returns:
out –
Trueif x is aQuantity,Falseotherwise.- Return type:
Examples
>>> import saiunit as u >>> u.math.is_quantity(u.Quantity(1.0, unit=u.meter)) True >>> u.math.is_quantity(1.0) False