as_quantity

utilipy.math.as_quantity(arg)[source]

Convert argument to a Quantity (or raise NotImplementedError).

from utils.

Returns
Quantity

not copied, quantity subclasses passed through.

Raises
NotImplementedError

if Quantity() fails