Skip to content

Commit

Permalink
GH ref
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed Oct 30, 2023
1 parent 9c479b0 commit 0373600
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v2.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ Datetimelike
- Bug in addition or subtraction of :class:`BusinessDay` offset with ``offset`` attribute to non-nanosecond :class:`Index`, :class:`Series`, or :class:`DataFrame` column giving incorrect results (:issue:`55608`)
- Bug in addition or subtraction of :class:`DateOffset` objects with microsecond components to ``datetime64`` :class:`Index`, :class:`Series`, or :class:`DataFrame` columns with non-nanosecond resolution (:issue:`55595`)
- Bug in addition or subtraction of very large :class:`Tick` objects with :class:`Timestamp` or :class:`Timedelta` objects raising ``OverflowError`` instead of ``OutOfBoundsTimedelta`` (:issue:`55503`)
- Bug in creating a :class:`Index`, :class:`Series`, or :class:`DataFrame` with a non-nanosecond ``datetime64`` dtype and inputs that would be out of bounds for a ``datetime64[ns]`` incorrectly raising ``OutOfBoundsDatetime`` (:issue:`??`)
- Bug in creating a :class:`Index`, :class:`Series`, or :class:`DataFrame` with a non-nanosecond ``datetime64`` dtype and inputs that would be out of bounds for a ``datetime64[ns]`` incorrectly raising ``OutOfBoundsDatetime`` (:issue:`55756`)
-

Timedelta
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/indexes/datetimes/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ def test_dti_convert_datetime_list(self, tzstr):
tm.assert_index_equal(dr, dr2)

def test_dti_constructor_with_non_nano_dtype(self):
# GH#55756
ts = Timestamp("2999-01-01")
dtype = "M8[us]"
# NB: the 2500 is interpreted as nanoseconds and rounded *down*
Expand All @@ -1028,6 +1029,7 @@ def test_dti_constructor_with_non_nano_dtype(self):
tm.assert_index_equal(result2, expected)

def test_dti_constructor_with_non_nano_now_today(self):
# GH#55756
now = Timestamp.now()
today = Timestamp.today()
result = DatetimeIndex(["now", "today"], dtype="M8[s]")
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/series/methods/test_astype.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_astype_dict_like(self, dtype_class):

class TestAstype:
def test_astype_object_to_dt64_non_nano(self):
# GH#???
# GH#55756
ts = Timestamp("2999-01-01")
dtype = "M8[us]"
# NB: the 2500 is interpreted as nanoseconds and rounded *down*
Expand Down

0 comments on commit 0373600

Please sign in to comment.