multiply_every

multiply_every(x, n, axis=None)[source]

Multiply blocks of size n along a specified axis.

Parameters:
  • x (jnp.ndarray) – Input array.

  • n (int) – Block size to multiply.

  • axis (int, optional) – Axis along which to multiply (0 for rows, 1 for columns).

Returns:

Resulting product array.

Return type:

jnp.ndarray

Raises:

ValueError – If the shape of the specified axis is not divisible by n.