jax.numpy.apply_over_axes
Warning
This page was created from a pull request (#9655).
jax.numpy.apply_over_axesΒΆ
- jax.numpy.apply_over_axes(func, a, axes)[source]ΒΆ
Apply a function repeatedly over multiple axes.
LAX-backend implementation of
apply_over_axes()
.Original docstring below.
func is called as res = func(a, axis), where axis is the first element of axes. The result res of the function call must have either the same dimensions as a or one less dimension. If res has one less dimension than a, a dimension is inserted before axis. The call to func is then repeated for each axis in axes, with res as the first argument.
- Parameters
func (function) β This function must take two arguments, func(a, axis).
a (array_like) β Input array.
axes (array_like) β Axes over which func is applied; the elements must be integers.
- Returns
apply_over_axis β The output array. The number of dimensions is the same as a, but the shape can be different. This depends on whether func changes the shape of its output with respect to its input.
- Return type