Skip to content

Update code for newer NumPy #46

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

Conversation

oleksandr-pavlyk
Copy link
Contributor

  1. Removed use of vendored numpy.pxd, replaced it with cimport numpy to resolve runtime warning during import of change in size of broadcast struct
  2. Use explicit namespace for NumPy C-API symbols imported by Cython. This caught several issues where C-API ndarray object was used where Python object of type np.ndarray was intended.
  3. Resolve compilation warnings reported by Clang about ignored type qualifier during casting.

Local build now passes, import does not report the runtime warning, and test suite passes.

1. Removed use of vendored numpy.pxd, replaced it with cimport numpy
   to resolve runtime warning during import of change in size of
   broadcast struct
2. Use explicit namespace for NumPy C-API symbols imported by
   Cython. This caught several issues where C-API ndarray object
   was used where Python object of type np.ndarray was intended.
3. Resolve compilation warnings reported by Clang about ignored
   type qualifier during casting.

Local build now passes, import does not report the runtime warning,
and test suite passes.
The helper file defines workaround_PyArray_MultiIter_SIZE, etc
which used NumPy 2.0 API when building with NumPy 2.0, and
a work-around for earlier versions.
@oleksandr-pavlyk oleksandr-pavlyk force-pushed the update-code-base-for-newer-numpy branch from f6f0a68 to 9640607 Compare July 21, 2024 23:24
Copy link
Collaborator

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

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

Only few minor comments from me.

@oleksandr-pavlyk oleksandr-pavlyk merged commit b0c5927 into update-installation-steps Jul 26, 2024
17 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the update-code-base-for-newer-numpy branch July 26, 2024 19:46
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