A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.jax.dev/en/latest/_autosummary/jax.numpy.unstack.html below:

jax.numpy.unstack — JAX documentation

jax.numpy.unstack#
jax.numpy.unstack(x, /, *, axis=0)[source]#

Unstack an array along an axis.

JAX implementation of array_api.unstack().

Parameters:
  • x (ArrayLike) – array to unstack. Must have x.ndim >= 1.

  • axis (int) – integer axis along which to unstack. Must satisfy -x.ndim <= axis < x.ndim.

Returns:

tuple of unstacked arrays.

Return type:

tuple[Array, …]

Examples

>>> arr = jnp.array([[1, 2, 3],
...                  [4, 5, 6]])
>>> arrs = jnp.unstack(arr)
>>> print(*arrs)
[1 2 3] [4 5 6]

stack() provides the inverse of this:

>>> jnp.stack(arrs)
Array([[1, 2, 3],
       [4, 5, 6]], dtype=int32)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4