Closed
Description
When surpassing the minimum number of elements threshold to use numexpr, the following operation starts to fail:
In [19]: td = pd.offsets.Day(3)
In [20]: td / pd.Series([1, 2]*5000)
Out[20]:
0 3 days 00:00:00
1 1 days 12:00:00
...
9998 3 days 00:00:00
9999 1 days 12:00:00
Length: 10000, dtype: timedelta64[ns]
In [21]: td / pd.Series([1, 2]*5001)
...
~/miniconda3/envs/dev/lib/python3.7/site-packages/numexpr/necompiler.py in getType(a)
701 if kind == 'S':
702 return bytes
--> 703 raise ValueError("unknown type %s" % a.dtype.name)
704
705
ValueError: unknown type object
This doesn't happen for a Timedelta object, I assume because of this check:
pandas/pandas/core/ops/array_ops.py
Lines 202 to 203 in 7af47c9