orthax.polyutils.as_series

orthax.polyutils.as_series(*arrs, trim=False)Source

Return arguments as a list of 1-d arrays.

The returned list contains array(s) of dtype double, complex double, or object. A 1-d argument of shape (N,) is parsed into N arrays of size one; a 2-d argument of shape (M,N) is parsed into M arrays of size N (i.e., is “parsed by row”); and a higher dimensional array raises a Value Error if it is not first reshaped into either a 1-d or 2-d array.

Parameters:
  • arrs (array_like) – 1- or 2-d array_like

  • trim (boolean, optional) – When True, trailing zeros are removed from the inputs. When False, the inputs are passed through intact.

Returns:

a1, a2,… (1-D arrays) – A copy of the input data as 1-d arrays.