Is `built-in method numpy.core._multiarray_umath.implement_array_function` a performance bottleneck?
问题 I'm using numpy v1.18.2 in some simulations, and using inbuilt functions such as np.unique , np.diff and np.interp . I'm using these functions on standard objects, i.e lists or numpy arrays. When I checked with cProfile , I saw that these functions make a call to an built-in method numpy.core._multiarray_umath.implement_array_function and that this method accounts for 32.5% of my runtime! To my understanding this is a wrapper that performs some checks to make sure the that the arguments