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

Interoperability issue with hyperspy and numba #768

Closed
kociak opened this issue Nov 28, 2021 · 4 comments
Closed

Interoperability issue with hyperspy and numba #768

kociak opened this issue Nov 28, 2021 · 4 comments

Comments

@kociak
Copy link

kociak commented Nov 28, 2021

The current version of nionswift (0.16.0) is not compatible with the current version of hyperspy (1.7.0.dev0). This arises due to numba requiring an older version of numpy than the one nionswift uses.
As indicated by the hyperspy community, in the present case nionswift seems not to follow the depreciation policy of numpy (https://numpy.org/neps/nep-0029-deprecation_policy.html).
The actual solution is to fork hyperspy and remove the calls to numba, which is not very handy. Also, I guess numba could be of some interest for nionswift application field.

@cmeyer
Copy link
Collaborator

cmeyer commented Nov 28, 2021

I didn't test this recommendation - but I think you can override the nionswift dependency to use the older numpy without any issue. The reason for the bump to numpy 1.21 is for numpy compatibility with Python 3.8 protocols; and that is only required for nionswift-instrumentation-kit and to pass Python typing tests. But, again, I haven't tested this directly. I'll look at it more closely tomorrow and see if we can back off the numpy requirement for nionswift only - nionswift-instrumentation-kit will continue to require the new numpy, unfortunately.

@cmeyer
Copy link
Collaborator

cmeyer commented Nov 28, 2021

@kociak
Copy link
Author

kociak commented Nov 29, 2021

Thanks. #769 is an excellent idea that broadens the restricted scope of the present issue
As for the current issue, my workout is to fork hyperpsy and remove any dependence to numba. A short term workaround only of course.

I think you can override the nionswift dependency to use the older numpy without any issue

sounds like a good short term workaround (until passing to the on-microscope nionswift version, that encompasses the instrumentation-kit). However, I am unsure how to override dependencies (any link welcome!)
Thanks for the link to the numba PR. Note sure when this version will be used in hyperspy

@cmeyer
Copy link
Collaborator

cmeyer commented Jan 16, 2022

Closing this with the release of numba 0.55.

@cmeyer cmeyer closed this as completed Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants