Unstack an array along an axis.
JAX implementation of array_api.unstack()
.
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
.
tuple of unstacked arrays.
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