ak.atleast_1d

Defined in awkward.operations.structure on line 4055.

ak.atleast_1d()
Parameters
  • arrays – Rectilinear arrays to be converted to NumPy arrays of at least 1 dimension.

  • axis (int) – The dimension at which this operation is applied. The outermost dimension is 0, followed by 1, etc., and negative values count backward from the innermost: -1 is the innermost dimension, -2 is the next level up, etc.

Implements NumPy’s atleast_1d function in a way that accepts ak.Array objects as the arrays.

If the arrays are not all rectilinear (i.e. if #np.to_numpy would raise an error), then this function raise an error.

Note: this function returns a NumPy array, not an Awkward Array.