numpy.apply_over_axes()
numpy.apply_over_axes
-
numpy.apply_over_axes(func, a, axes)
[source] -
Apply a function repeatedly over multiple axes.
func
is called asres = func(a, axis)
, whereaxis
is the first element ofaxes
. The resultres
of the function call must have either the same dimensions asa
or one less dimension. Ifres
has one less dimension thana
, a dimension is inserted beforeaxis
. The call tofunc
is then repeated for each axis inaxes
, withres
as the first argument.