finam.data.to_compressed#
- finam.data.to_compressed(xdata, order='C', mask=None)[source]#
Return all the non-masked data as a 1-D array respecting the given array order.
- Parameters:
data (
pint.Quantity
ornumpy.ndarray
ornumpy.ma.MaskedArray
) – The reference object input.order (str) – order argument for
numpy.ravel
mask (
Mask
value or valid boolean mask forMasked arrays
, optional) – mask to use when data is not masked already
- Returns:
New object with the flat shape and only unmasked data but and same type as input. Units will be taken from the input if present.
- Return type:
See also
numpy.ma.compressed()
Numpy routine doing the same but only for C-order.