jax.numpy.atleast_3d

Contents

jax.numpy.atleast_3d#

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

View inputs as arrays with at least three dimensions.

LAX-backend implementation of numpy.atleast_3d().

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 three 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 three or more dimensions are preserved.

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

Returns:

res1, res2, … – An array, or list of arrays, each with a.ndim >= 3. Copies are avoided where possible, and views with three or more dimensions are returned. For example, a 1-D array of shape (N,) becomes a view of shape (1, N, 1), and a 2-D array of shape (M, N) becomes a view of shape (M, N, 1).

Return type:

ndarray