numpy.ma.apply_along_axis()

numpy.ma.apply_along_axis

numpy.ma.apply_along_axis(func1d, axis, arr, *args, **kwargs) [source]

Apply a function to 1-D slices along the given axis.

Execute func1d(a, *args) where func1d operates on 1-D arrays and a is a 1-D slice of arr along axis.

Parameters:

func1d : function

This function should accept 1-D arrays. It is applied to 1-D slices of arr along