File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -149,18 +149,18 @@ def cast_from_unit_vectorized(
149
149
if p:
150
150
frac = np.round(frac, p)
151
151
152
- try :
153
- for i in range ( len (values)) :
152
+ for i in range ( len (values)) :
153
+ try :
154
154
if base[i] == NPY_NAT:
155
155
out[i] = NPY_NAT
156
156
else :
157
157
out[i] = < int64_t> (base[i] * m) + < int64_t> (frac[i] * m)
158
- except (OverflowError , FloatingPointError ) as err:
159
- # FloatingPointError can be issued if we have float dtype and have
160
- # set np.errstate(over="raise")
161
- raise OutOfBoundsDatetime(
162
- f" cannot convert input {values[i]} with the unit '{unit}'"
163
- ) from err
158
+ except (OverflowError , FloatingPointError ) as err:
159
+ # FloatingPointError can be issued if we have float dtype and have
160
+ # set np.errstate(over="raise")
161
+ raise OutOfBoundsDatetime(
162
+ f" cannot convert input {values[i]} with the unit '{unit}'"
163
+ ) from err
164
164
return out
165
165
166
166
You can’t perform that action at this time.
0 commit comments