Skip to content

numpy 1.24.3 support for comparisons with pd.Timedelta and pd.Timestamp #662

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

Closed
Dr-Irv opened this issue Apr 26, 2023 · 0 comments · Fixed by #667
Closed

numpy 1.24.3 support for comparisons with pd.Timedelta and pd.Timestamp #662

Dr-Irv opened this issue Apr 26, 2023 · 0 comments · Fixed by #667

Comments

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Apr 26, 2023

I did a poetry update and my environment got updated to numpy 1.24.3. In that version of numpy, comparisons of numpy timedelta or timestamp objects with pandas Timedelta and Timestamp objects now return a bool instead of np.bool_, when the numpy object is on the LHS of the comparison. The type declarations didn't change - they still return Any.

So we need to do the following:

  1. Update the pyproject.toml to point to numpy 1.24.3
  2. Update tests of the following form in test_scalars.py to have check compare the result to bool instead of np.bool_:
check(assert_type(c_timedelta64 > td, Any), np.bool_)

I think there are about 14 such tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant