File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 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(
149149 if p:
150150 frac = np.round(frac, p)
151151
152- try :
153- for i in range ( len (values)) :
152+ for i in range ( len (values)) :
153+ try :
154154 if base[i] == NPY_NAT:
155155 out[i] = NPY_NAT
156156 else :
157157 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
164164 return out
165165
166166
You can’t perform that action at this time.
0 commit comments