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.array_split.html below:

jax.numpy.array_split — JAX documentation

jax.numpy.array_split#
jax.numpy.array_split(ary, indices_or_sections, axis=0)[source]#

Split an array into sub-arrays.

JAX implementation of numpy.array_split().

Refer to the documentation of jax.numpy.split() for details; array_split is equivalent to split, but allows integer indices_or_sections which does not evenly divide the split axis.

Examples

>>> x = jnp.array([1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> chunks = jnp.array_split(x, 4)
>>> print(*chunks)
[1 2 3] [4 5] [6 7] [8 9]
Parameters:
  • ary (ArrayLike)

  • indices_or_sections (int | Sequence[int] | ArrayLike)

  • axis (int)

Return type:

list[Array]


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