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

Add cnp.import_array for numpy>=2 #75

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install build packages and pytest
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install "conan<2" scikit-build pytest cython numpy
python -m pip install "conan<2" scikit-build pytest cython numpy>=2

- name: Create sdist
run: python setup.py sdist
Expand Down
3 changes: 3 additions & 0 deletions src/pyssht/cpyssht.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import numpy as np
cimport numpy as np
cimport cython

# required if using any part of the numpy PyArray_* API
np.import_array()

from libc.math cimport log, exp, sqrt, atan2, cos, sin, asin, atan, tan
from scipy.special import factorial
from scipy.interpolate import interp2d
Expand Down
3 changes: 3 additions & 0 deletions src/pyssht/ducc_interface.pyx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import numpy as np
cimport numpy as np

# required if using any part of the numpy PyArray_* API
np.import_array()

cdef import_ducc0():
import ducc0
major, minor, patch = ducc0.__version__.split('.')
Expand Down
Loading