question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`ufunc did not contain a loop with signature matching types` error with NumPy 1.22

See original GitHub issue

For example, running:

$ python -m numba.runtests numba.tests.npyufunc -vf

results in:

test_basic_gufunc (numba.tests.npyufunc.test_ufuncbuilding.TestGUfuncBuilding) ... ok
test_basic_gufunc (numba.tests.npyufunc.test_ufuncbuilding.TestGUfuncBuildingJitDisabled) ... ok
test_basic_ufunc (numba.tests.npyufunc.test_ufuncbuilding.TestUfuncBuilding) ... ERROR

======================================================================
ERROR: test_basic_ufunc (numba.tests.npyufunc.test_ufuncbuilding.TestUfuncBuilding)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gmarkall/numbadev/numba/numba/tests/npyufunc/test_ufuncbuilding.py", line 89, in test_basic_ufunc
    check(a)
  File "/home/gmarkall/numbadev/numba/numba/tests/npyufunc/test_ufuncbuilding.py", line 84, in check
    b = ufunc(a, a)
numpy.core._exceptions._UFuncNoLoopError: ufunc 'add' did not contain a loop with signature matching types (<class 'numpy.dtype[int32]'>, <class 'numpy.dtype[int32]'>) -> None

----------------------------------------------------------------------
Ran 3 tests in 0.300s

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
esccommented, Mar 11, 2022

Cool, will be nice to have the newest NumPy and numba working again soon 😃. I am a bit curious, do you always pin the numpy version because you want to ensure full compatibility across the NumPy API? Mainly, I am wondering if we can reduce the “downtime” where the newest NumPy isn’t supported by numba (at least on a fresh install) a bit in some simple way, e.g. by pre-release testing (giving us a month or so to fix up NumPy and up to a month head-start on numba changes when necessary).

Yes, I am the right person to talk to about this. We do want to start tracking NumPy closer to ensure comaptability with upcoming releases. We usually pin Numpy on our release branch to the latest working version at the time to prevent any unfortunate surprises if a Numpy release comes out half-way during our own releases cycle. I think it will be good idea however to discuss upgrading out “infrastructure” in it’s own ticket.

0reactions
sebergcommented, Mar 14, 2022

I think there’s probably two separate issues?

Yes, I guess so. I believe I had mentioned it before, aside from --pre releases, we do have NumPy dev wheels available: https://anaconda.org/scipy-wheels-nightly/numpy If you test against those “nightlies”, you probably want to say it is OK for that test to fail. But it would give a nice heads up about upcoming changes and allow you to float issues to NumPy quickly. (I guess testing numba is difficult, so I am not sure how easy this is.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

ufunc 'x' did not contain a loop with signature matching types ...
I am facing the same issue with a numba function. The function throws the mentioned error with numpy 1.22 but works in numpy...
Read more >
What does "ufunc did not contain a loop with signature ...
The error says you can't add a string ('U') and a number. Use print('transpose', value) , In other words, use a comma, not...
Read more >
numpy.core._exceptions._UFuncNoLoopError: ufunc 'add' did ...
This error happens when you try to add a numpy integer to a string, ... ufunc 'add' did not contain a loop with...
Read more >
Universal functions (ufunc) — NumPy v1.24 Manual
When all DTypes are fixed, a specific loop is chosen or an error raised if no matching loop exists. If some DTypes are...
Read more >
Xarray aply ufunc is giving new error - Pangeo Cloud Support
import xarray as xr import numpy as np from fastjmd95 import jmd95numba salt ... ufunc 'rho' did not contain a loop with signature...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found