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

jax.numpy.cumulative_prod — JAX documentation

jax.numpy.cumulative_prod#
jax.numpy.cumulative_prod(x, /, *, axis=None, dtype=None, include_initial=False)[source]#

Cumulative product along the axis of an array.

JAX implementation of numpy.cumulative_prod().

Parameters:
  • x (ArrayLike) – N-dimensional array

  • axis (int | None | None) – integer axis along which to accumulate. If x is one-dimensional, this argument is optional and defaults to zero.

  • dtype (DTypeLike | None | None) – optional dtype of the output.

  • include_initial (bool) – if True, then include the initial value in the cumulative product. Default is False.

Returns:

An array containing the accumulated values.

Return type:

Array

See also

Examples

>>> x = jnp.array([[1, 2, 3],
...                [4, 5, 6]])
>>> jnp.cumulative_prod(x, axis=1)
Array([[  1,   2,   6],
       [  4,  20, 120]], dtype=int32)
>>> jnp.cumulative_prod(x, axis=1, include_initial=True)
Array([[  1,   1,   2,   6],
       [  1,   4,  20, 120]], 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.3