@@ -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,
@@ -2472,34 +2471,27 @@ default 'raise'
2472
2471
dts.year = validate(" year" , year)
2473
2472
rep_reso = NPY_DATETIMEUNIT.NPY_FR_Y
2474
2473
if month is not None :
2475
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_M
2476
2474
dts.month = validate(" month" , month)
2477
2475
rep_reso = NPY_DATETIMEUNIT.NPY_FR_M
2478
2476
if day is not None :
2479
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_D
2480
2477
dts.day = validate(" day" , day)
2481
2478
rep_reso = NPY_DATETIMEUNIT.NPY_FR_D
2482
2479
if hour is not None :
2483
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_h
2484
2480
dts.hour = validate(" hour" , hour)
2485
2481
rep_reso = NPY_DATETIMEUNIT.NPY_FR_h
2486
2482
if minute is not None :
2487
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_m
2488
2483
dts.min = validate(" minute" , minute)
2489
2484
rep_reso = NPY_DATETIMEUNIT.NPY_FR_m
2490
2485
if second is not None :
2491
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_s
2492
2486
dts.sec = validate(" second" , second)
2493
2487
rep_reso = NPY_DATETIMEUNIT.NPY_FR_s
2494
2488
if microsecond is not None :
2495
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_ms
2496
2489
dts.us = validate(" microsecond" , microsecond)
2497
2490
if microsecond > 999 :
2498
2491
rep_reso = NPY_DATETIMEUNIT.NPY_FR_us
2499
2492
else :
2500
2493
rep_reso = NPY_DATETIMEUNIT.NPY_FR_ms
2501
2494
if nanosecond is not None :
2502
- rep_reso = NPY_DATETIMEUNIT.NPY_FR_ns
2503
2495
dts.ps = validate(" nanosecond" , nanosecond) * 1000
2504
2496
rep_reso = NPY_DATETIMEUNIT.NPY_FR_ns
2505
2497
if tzinfo is not object :
0 commit comments