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

numba is broken in 2022.02.04 image #297

Closed
rabernat opened this issue Mar 11, 2022 · 1 comment
Closed

numba is broken in 2022.02.04 image #297

rabernat opened this issue Mar 11, 2022 · 1 comment

Comments

@rabernat
Copy link
Member

rabernat commented Mar 11, 2022

The following code does not work in our latest docker image 2022.02.04 with

  • numpy 1.22.2
  • numba 0.53.1
from numba import vectorize, float64
@vectorize([float64(float64)])
def add_one(a):
    return a + 1
add_one(1.)

# UFuncTypeError: ufunc 'add_one' did not contain a loop with signature matching types <class 'numpy.dtype[float64]'> -> None

I can fix it by installing the a newer version of numba, which requires an older version of numpy

  • numpy 1.21.5
  • numba 0.55.1

This seems like numpy/numpy#20735

xref https://discourse.pangeo.io/t/xarray-aply-ufunc-is-giving-new-error/2309

@rabernat
Copy link
Member Author

Actually, our latest master is on numpy 1.22.3, where this should be fixed (see numpy/numpy#21139)

https://conda.anaconda.org/conda-forge/linux-64/numpy-1.22.3-py39h18676bf_0.tar.bz2#58c2800b252e3519d855161057223df4

However, numba is still pinning < 1.22. So that's why we are stuck on numba 0.53.1:

https://conda.anaconda.org/conda-forge/linux-64/numba-0.53.1-py39h56b8d98_1.tar.bz2#2b8674a6cb39ccd00833311aae90640e

So this works in our latest image!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant