-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Closed
Copy link
Labels
BugComplexComplex NumbersComplex NumbersIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves
Milestone
Description
arr = np.arange(5).astype("c8")
ser = pd.Series(arr)
val = np.finfo(np.float64).max
val = val.astype("c16")
>>> val
(1.7976931348623157e+308+0j)
ser[0] = val
>>> ser
0 inf+0.000000e+00j
1 1.000000e+00+0.000000e+00j
2 2.000000e+00+0.000000e+00j
3 3.000000e+00+0.000000e+00j
4 4.000000e+00+0.000000e+00j
dtype: complex64
For IntBlock we check the itemsize to avoid overflows, but for FloatBlock and ComplexBlock we do not, so we get the inf
here. Should we instead be upcasting?
Metadata
Metadata
Assignees
Labels
BugComplexComplex NumbersComplex NumbersIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves