Numpy Array Apply Function In Matlab Example