Skip to content

Conversation

@hoxbro
Copy link
Member

@hoxbro hoxbro commented Nov 6, 2023

Found with the latest release of ruff and this command ruff check . --preview --select=NPY201 --fix

@codecov
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (09da5a0) 85.63% compared to head (5e54e2b) 85.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1306   +/-   ##
=======================================
  Coverage   85.63%   85.63%           
=======================================
  Files          51       51           
  Lines       11286    11286           
=======================================
  Hits         9665     9665           
  Misses       1621     1621           

@hoxbro hoxbro requested a review from jbednar November 6, 2023 13:15
unit, _ = np.datetime_data(dt)
return TimeDelta(unit=unit)
elif np.issubdtype(dt, np.unicode_):
elif np.__version__[0] < "2" and np.issubdtype(dt, np.unicode_):
Copy link
Member

Choose a reason for hiding this comment

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

Does numpy2 not have nay unicode dtypes?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, the recommendation is to use np.str_ instead, but this is checked further down, which is why I did it this way.

https://numpy.org/devdocs/numpy_2_0_migration_guide.html

@hoxbro hoxbro merged commit 7261610 into main Apr 8, 2024
@hoxbro hoxbro deleted the npy2 branch April 8, 2024 16:33
@hoxbro hoxbro mentioned this pull request Apr 25, 2024
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 this pull request may close these issues.

3 participants