- qunits.Quantity. m_as ( unit )[source]
-
Get the value of the quantity in the target unit. Same as
Quantity.magnitude_as.- Parameters:
-
- unitUnit | None
The target unit, e.g.
u.m, orNonefor the SI unit of the dimension.
- Returns:
-
- magnitudefloat | NDArray[np.float64]
The value of the quantity in the target unit.
- Raises:
-
- ValueError
If the target unit has another dimension or context.
- TypeError
If
unitis neither aUnitnorNone.