*argsin a signature numpy.apply_along_axis(func1d, axis, arr, *args)means that other positional arguments can be passed .
If you want to add two numpy arrays in different ways, just use the operator +:
In [112]: test_array = np.arange(10)
...: test_array2 = np.arange(10)
In [113]: test_array+test_array2
Out[113]: array([ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18])
Remove keywords axis=, arr=, args=and it should work:
In [120]: np.apply_along_axis(example_func, 0, test_array, test_array2)
Out[120]: array([ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18])
source
share