unify¶
-
simcado.utils.
unify
(x, unit, length=1)[source]¶ Convert all types of input to an astropy array/unit pair
- Parameters
- xint, float, np.ndarray, astropy.Quantity
The array to be turned into an astropy.Quantity
- unitastropy.Quantity
The units to attach to the array
- lengthint, optional
If
x
is a scalar, and the desired output is an array withlength
- Returns
- yastropy.Quantity