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
MAINT: Move export for scipy arm64 helper into main module #22972
Conversation
The failure seem due to
|
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.
a14ce74
to
8d6d4aa
Compare
I suspect there is a missing backport. |
#define npy_asinh asinh | ||
#define npy_copysign copysign | ||
#define npy_log1p log1p | ||
#endif | ||
double npy_nextafter(double x, double y); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I restored this line which should not be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks. So that is why I had to add nextafter, but it was previously no issue. I guess it could be excluded from the other file in that case, but seems it doesn't matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to be in both files for this branch. One is compiled into libnpy_math.a
, this is the one that is removed from main
but on this branch it is alive and well. The other implementation is exported from the main numpy namespace because of <mumble>macos arm64 build linking problem</mumble>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrgg, I guess that because npy_nextafter
is already here, it should not have been included in arm64_exports.c
for the backport...
Thanks Matti. |
Backport of #22939.
This is a follow up to gh-22679 which addressed gh-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:
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.