Skip to content

REF: de-duplicate PeriodArray arithmetic code #47826

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 1 commit into from
Jul 25, 2022

Conversation

jbrockmendel
Copy link
Member

and improved exception message

  • 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 type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@mroeschke mroeschke added Refactor Internal refactoring of code Numeric Operations Arithmetic, Comparison, and Logical operations Period Period data type labels Jul 25, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jul 25, 2022
raise raise_on_incompatible(self, other) from err
# e.g. if we have minutes freq and try to add 30s
# "Cannot losslessly convert units"
raise IncompatibleFrequency(
Copy link
Member

Choose a reason for hiding this comment

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

At some point, could you expose this exception in pandas/errors/__init__.py since I think the user can encounter this error?

@mroeschke mroeschke merged commit e6f1537 into pandas-dev:main Jul 25, 2022
@jbrockmendel jbrockmendel deleted the ref-check_timedeltalike branch July 25, 2022 17:34
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 Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants