mlx.core.atleast_1d

Contents

mlx.core.atleast_1d#

atleast_1d(*arys: array, stream: None | Stream | Device = None) array | list[array]#

Convert all arrays to have at least one dimension.

Parameters:
  • *arys – Input arrays.

  • stream (Union[None, Stream, Device], optional) – The stream to execute the operation on.

Returns:

An array or list of arrays with at least one dimension.

Return type:

array or list(array)