-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: remove arrmap, closes #27251 #27530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This removes the dependency of this module on non-cython parts of the code |
#27251 (comment) was it not feasible to just use np.vectorize? is there is a perf impact? |
Probably. My understanding was that is just a fancy for-loop. Am I missing something?
Haven't measured. On the one hand we get rid of a call to lib.maybe_convert_objects (and a semi-expensive runtime import), and on the other we do a python-space list comprehension. My assumption is that this isn't called with particularly large arrays for the quantile arg. One alternative would be to keep arrmap_float64 and specialize it given that we know the output will be float64. We'd still get to remove the maybe_convert_objects call, which is what I'm most excited about. |
so according the numpy docs, The vectorize function is provided primarily for convenience, not for performance. so I guess that using a list comprehension is a sensible approach.
i'll leave that to you to decide if its worth further investigation. |
@simonjayhawkins yeah we talked about this in a previous issue. even if this was a measureable slowdown, would still take it in reducing complexity. |
thanks @jbrockmendel |
No description provided.