@@ -59,7 +59,6 @@ from pandas._libs.tslibs.conversion cimport (
59
59
maybe_localize_tso,
60
60
)
61
61
from pandas._libs.tslibs.dtypes cimport (
62
- abbrev_to_npy_unit,
63
62
npy_unit_to_abbrev,
64
63
npy_unit_to_attrname,
65
64
periods_per_day,
@@ -2468,38 +2467,30 @@ default 'raise'
2468
2467
return v
2469
2468
2470
2469
if year is not None :
2471
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_Y
2472
2470
dts.year = validate(" year" , year)
2473
2471
rep_reso = NPY_DATETIMEUNIT.NPY_FR_Y
2474
2472
if month is not None :
2475
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_M
2476
2473
dts.month = validate(" month" , month)
2477
2474
rep_reso = NPY_DATETIMEUNIT.NPY_FR_M
2478
2475
if day is not None :
2479
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_D
2480
2476
dts.day = validate(" day" , day)
2481
2477
rep_reso = NPY_DATETIMEUNIT.NPY_FR_D
2482
2478
if hour is not None :
2483
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_h
2484
2479
dts.hour = validate(" hour" , hour)
2485
2480
rep_reso = NPY_DATETIMEUNIT.NPY_FR_h
2486
2481
if minute is not None :
2487
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_m
2488
2482
dts.min = validate(" minute" , minute)
2489
2483
rep_reso = NPY_DATETIMEUNIT.NPY_FR_m
2490
2484
if second is not None :
2491
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_s
2492
2485
dts.sec = validate(" second" , second)
2493
2486
rep_reso = NPY_DATETIMEUNIT.NPY_FR_s
2494
2487
if microsecond is not None :
2495
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_ms
2496
2488
dts.us = validate(" microsecond" , microsecond)
2497
2489
if microsecond > 999 :
2498
2490
rep_reso = NPY_DATETIMEUNIT.NPY_FR_us
2499
2491
else :
2500
2492
rep_reso = NPY_DATETIMEUNIT.NPY_FR_ms
2501
2493
if nanosecond is not None :
2502
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_ns
2503
2494
dts.ps = validate(" nanosecond" , nanosecond) * 1000
2504
2495
rep_reso = NPY_DATETIMEUNIT.NPY_FR_ns
2505
2496
if tzinfo is not object :
0 commit comments