Skip to content

BUG: Period + np.timedelta64(nat) #47196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 3, 2022

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
def test_add_sub_td64_nat(self):
# GH#47196
per = Period("2022-06-01", "D")
nat = np.timedelta64("NaT", "ns")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth testing/mentioning other freq strings besides ns?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't make a difference but harmless if you think its important

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah a parameterization of 2 or 3 frequencies would be good just in case.

@mroeschke mroeschke added Numeric Operations Arithmetic, Comparison, and Logical operations Period Period data type labels Jun 2, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jun 3, 2022
@mroeschke mroeschke merged commit b6a058b into pandas-dev:main Jun 3, 2022
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the bug-period-add branch June 3, 2022 15:51
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* BUG: Period + np.timedelta64(nat)

* GH ref

* test reversed subtraction raises

* parametrize over unit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations Period Period data type
2 participants