REF: Replace np.find_common_dtype with np.result_type#49569
REF: Replace np.find_common_dtype with np.result_type#49569mroeschke wants to merge 3 commits intopandas-dev:mainfrom
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