jax.numpy.atleast_1dΒΆ

jax.numpy.atleast_1d(*arys)[source]ΒΆ

Convert inputs to arrays with at least one dimension.

LAX-backend implementation of atleast_1d().

Original docstring below.

Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved.

Parameters
  • arys1 (array_like) – One or more input arrays.

  • arys2 (array_like) – One or more input arrays.

  • .. (array_like) – One or more input arrays.

Returns

ret – An array, or list of arrays, each with a.ndim >= 1. Copies are made only if necessary.

Return type

ndarray