BLD: revert function() -> #define for 3 npymath functions#22679
Merged
rgommers merged 1 commit intonumpy:mainfrom Nov 27, 2022
Merged
BLD: revert function() -> #define for 3 npymath functions#22679rgommers merged 1 commit intonumpy:mainfrom
rgommers merged 1 commit intonumpy:mainfrom
Conversation
Member
Author
Contributor
|
Yep, that works for me. |
rgommers
approved these changes
Nov 27, 2022
Member
rgommers
left a comment
There was a problem hiding this comment.
LGTM, thanks @mattip! And thanks @Carreau for testing.
I also went back and checked older SciPy releases:
1.8.1works, the other symbols that turned into defines are not used,1.7.3has an upper bound so it cannot be used from wheels together with numpy 1.24. And on conda-forge, this issue isn't visible.
So in it goes.
rgommers
added a commit
to rgommers/numpy
that referenced
this pull request
Dec 14, 2022
This was due to a cross-merge conflict. numpygh-22679 added a new file to the setup.py build, while the Meson build got merged. It's a file that only does anything on arm64 macOS, hence it wasn't noticed in CI. Addresses a "missing `npy_asinh`" problem discussed in numpygh-22796 [skip azp] [skip circle] [skip cirrus]
seberg
added a commit
to seberg/numpy
that referenced
this pull request
Jan 5, 2023
This is a follow up to numpygh-22679 which addressed numpygh-22673. The main thing is that we want the functions to be available after importing NumPy, so they need to be part of multiarray. However, `npymath` is a static library, so the symbols are not really exported there. The former PR did actually work in practice but this seems like it is technically the right place? For some reason, I had to add nextafter to be able to do: from scipy.spatial.distance import euclidean with the SciPy 1.9.3 wheels. SciPy test collection works with this for the 1.9.3 wheel, so this should be all the symbols hopefully.
seberg
added a commit
to seberg/numpy
that referenced
this pull request
Jan 5, 2023
This is a follow up to numpygh-22679 which addressed numpygh-22673. The main thing is that we want the functions to be available after importing NumPy, so they need to be part of multiarray. However, `npymath` is a static library, so the symbols are not really exported there. The former PR did actually work in practice but this seems like it is technically the right place? For some reason, I had to add nextafter to be able to do: from scipy.spatial.distance import euclidean with the SciPy 1.9.3 wheels. SciPy test collection works with this for the 1.9.3 wheel, so this should be all the symbols hopefully.
charris
pushed a commit
to charris/numpy
that referenced
this pull request
Jan 8, 2023
This is a follow up to numpygh-22679 which addressed numpygh-22673. The main thing is that we want the functions to be available after importing NumPy, so they need to be part of multiarray. However, `npymath` is a static library, so the symbols are not really exported there. The former PR did actually work in practice but this seems like it is technically the right place? For some reason, I had to add nextafter to be able to do: from scipy.spatial.distance import euclidean with the SciPy 1.9.3 wheels. SciPy test collection works with this for the 1.9.3 wheel, so this should be all the symbols hopefully.
charris
pushed a commit
to charris/numpy
that referenced
this pull request
Jan 8, 2023
This is a follow up to numpygh-22679 which addressed numpygh-22673. The main thing is that we want the functions to be available after importing NumPy, so they need to be part of multiarray. However, `npymath` is a static library, so the symbols are not really exported there. The former PR did actually work in practice but this seems like it is technically the right place? For some reason, I had to add nextafter to be able to do: from scipy.spatial.distance import euclidean with the SciPy 1.9.3 wheels. SciPy test collection works with this for the 1.9.3 wheel, so this should be all the symbols hopefully.
charris
pushed a commit
to charris/numpy
that referenced
this pull request
Jan 9, 2023
This is a follow up to numpygh-22679 which addressed numpygh-22673. The main thing is that we want the functions to be available after importing NumPy, so they need to be part of multiarray. However, `npymath` is a static library, so the symbols are not really exported there. The former PR did actually work in practice but this seems like it is technically the right place? For some reason, I had to add nextafter to be able to do: from scipy.spatial.distance import euclidean with the SciPy 1.9.3 wheels. SciPy test collection works with this for the 1.9.3 wheel, so this should be all the symbols hopefully.
Member
|
Could you please open a new issue @queirozfcom with as much detail about versions as possible? You're using a venv on top of conda it looks like, and not sure where SciPy is coming from. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

It turns out scipy is cross-compiling for macos-arm64 on macos-x86_64 hardware, and using the numpy macos-x86_64 wheel to get
libnpymath.aThis causes a linker warning but not an error. At runtime, when using NumPy 1.24, importingscipy.specialfails because functions are missing: we changed the external functions to defines when refactoring npymath.This PR exports the missing functions. Closes #22673. Going forward, SciPy should fix its build, but that is too late for the released wheels.