-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: Replace np.find_common_dtype with np.result_type #49569
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
Hmmmm, the fact that |
A philosophical question: does |
Yeah I think pandas appreciates that But I think
|
It is odd/wrong in NumPy as well. Another problem is timedelta+integers. I wanted to look into that a bit and think about deprecating it (this doesn't help you immediately maybe). I suspect the reason is to make certain math promotions work easier (i.e. find timedelta + int as a loop that uses timedelta+timedelta), and there should be better solutions for that. EDIT: I can't really think of an obvious workaround right now. Unless there is only one input, I think a non-numeric dtype return was effectively always object, so:
might work, but feels also a bit clunky. (The above would allow certain structured dtypes to promote correctly for example). So there might be a point in not deprecating and first cleaning up the bad time promotion (and strings). |
From a pandas point of view,
Yeah we would probably migrate |
Yeah, looking into fixing the timedelta/datetime promotion rules (i.e. its nonsense that they promote with bool/integers or with each other). |
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Closing this for now since we can't fully use |
In preparation of numpy/numpy#22539