Skip to content

Interoperability issue with hyperspy and numba #768

Description

@kociak

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.

Activity

  1. cmeyer commented on Nov 28, 2021

    @cmeyer
    Contributor

    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.

  2. kociak commented on Nov 29, 2021

    @kociak
    Author

    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

  3. cmeyer commented on Jan 16, 2022

    @cmeyer
    Contributor

    Closing this with the release of numba 0.55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions