Skip to content

Commit c5f2de3

Browse files
committed
seberg suggested fix, whatsnew
1 parent 5f6e95e commit c5f2de3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ Datetimelike
693693
- Bug in :attr:`is_year_start` where a DateTimeIndex constructed via a date_range with frequency 'MS' wouldn't have the correct year or quarter start attributes (:issue:`57377`)
694694
- Bug in :class:`DataFrame` raising ``ValueError`` when ``dtype`` is ``timedelta64`` and ``data`` is a list containing ``None`` (:issue:`60064`)
695695
- Bug in :class:`Timestamp` constructor failing to raise when ``tz=None`` is explicitly specified in conjunction with timezone-aware ``tzinfo`` or data (:issue:`48688`)
696+
- Bug in :class:`Timestamp` constructor failing to raise when given a ``np.datetime64`` object with non-standard unit (:issue:`25611`)
696697
- Bug in :func:`date_range` where the last valid timestamp would sometimes not be produced (:issue:`56134`)
697698
- Bug in :func:`date_range` where using a negative frequency value would not include all points between the start and end values (:issue:`56147`)
698699
- Bug in :func:`tseries.api.guess_datetime_format` would fail to infer time format when "%Y" == "%H%M" (:issue:`57452`)

pandas/_libs/tslibs/conversion.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ cdef _TSObject convert_to_tsobject(object ts, tzinfo tz, str unit,
369369
if checknull_with_nat_and_na(ts):
370370
obj.value = NPY_NAT
371371
elif cnp.is_datetime64_object(ts):
372-
num = (<PyDatetimeScalarObject*>obj).obmeta.num
372+
num = (<PyDatetimeScalarObject*>ts).obmeta.num
373373
if num != 1:
374374
raise ValueError(
375375
# GH#25611

0 commit comments

Comments
 (0)