You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid assuming that NaN casts to NaT (= fails on riscv64/hppa ?)
Don't round to int for the bounds check when we don't for the real
conversion (wrong near the bounds, and maybe also a waste of time)
Author: Rebecca N. Palmer <[email protected]>
Forwarded: pandas-dev/pandas#50183
Gbp-Pq: Name float_to_datetime.patch
fvalues = iresult.astype("f8") * mult # TODO as this is only used for bounds checking, would it be more efficient to divide the bounds by mult? (don't just use integer iresult * mult, we need arithmetic overflow to be an error not a wraparound)
305
+
need_to_iterate =False
306
+
307
+
if values.dtype.kind in ["f",]:
308
+
mask = (values != values) | (values == NPY_NAT) # first is NaNs
309
+
fvalues = (values * mult).astype("f8") # TODO would values.astype('f8')*mult have less rounding error? (or does this need to support longer-than-double floats where it's worse?) would copy=False be faster?
0 commit comments