jax.numpy.atleast_2d

Contents

jax.numpy.atleast_2d#

jax.numpy.atleast_2d() list[Array][source]#
jax.numpy.atleast_2d(x: ArrayLike, /) Array
jax.numpy.atleast_2d(x: ArrayLike, y: ArrayLike, /, *arys: ArrayLike) list[Array]

View inputs as arrays with at least two dimensions.

LAX-backend implementation of numpy.atleast_2d().

The JAX version of this function may in some cases return a copy rather than a view of the input.

Original docstring below.

Parameters:
  • arys1 (array_like) – One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved.

  • arys2 (array_like) – One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved.

  • ... (array_like) – One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved.

Returns:

res, res2, … – An array, or tuple of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned.

Return type:

ndarray