Skip to content
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

Numpy 2.0 support #276

Merged
merged 6 commits into from
Sep 26, 2024
Merged

Numpy 2.0 support #276

merged 6 commits into from
Sep 26, 2024

Conversation

ljgray
Copy link
Contributor

@ljgray ljgray commented Aug 8, 2024

  • compiles against numpy >= 2.0.0rc1
  • calls np.import_array() in weighted_median to include required headers
  • replaces deprecated datetime.datetime.utcfromtimestamp with datetime.datetime.fromtimestamp(..., datetime.timezone.utc)
  • Uses legacy numpy print options - in numpy 2, numpy scalars are printed with type information, i.e. np.float64(3.0) instead of 3.0. This breaks doctests.

@ljgray ljgray force-pushed the numpy-2.0 branch 2 times, most recently from c7fd05b to 4e48eb8 Compare August 8, 2024 23:14
@ljgray ljgray changed the title Nump 2.0 support Numpy 2.0 support Aug 8, 2024
@ljgray ljgray force-pushed the numpy-2.0 branch 4 times, most recently from 403ffa9 to 915926b Compare August 9, 2024 01:08
@ljgray ljgray force-pushed the numpy-2.0 branch 2 times, most recently from 50de8c0 to eb3dd8b Compare September 26, 2024 20:10
@ljgray ljgray force-pushed the numpy-2.0 branch 2 times, most recently from 95ca0d2 to a606465 Compare September 26, 2024 21:21
@ljgray ljgray force-pushed the numpy-2.0 branch 2 times, most recently from 7cf951c to ebcb224 Compare September 26, 2024 22:03
@ljgray ljgray marked this pull request as ready for review September 26, 2024 22:34
Copy link
Member

@ketiltrout ketiltrout left a comment

Choose a reason for hiding this comment

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

The set_printoptions thing is annoying, but probably the best solution in this case.

@ljgray ljgray merged commit aa65a49 into master Sep 26, 2024
5 checks passed
@ljgray ljgray deleted the numpy-2.0 branch September 26, 2024 23:05
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.

2 participants