numpy ediff1d tests have TypeError in `to_end` (numpy 1.19)
See original GitHub issue- I have tried using the latest released version of Numba: 0.50.1
- I have included below a minimal working reproducer
I’m seeing some errors in tests, building and running numba 0.50.1 on Debian unstable (python 3.8.3, numpy 1.19.0).
I’ll focus on runtime test failures here (running tests on installed system, not build-time tests). Runtime tests are triggered with MPLBACKEND=Agg python3.8 -Wd -m numba.runtests -v -m
but the failing test can be run manually:
python3 -m pytest -k "test_ediff1d_edge_cases" /usr/lib/python3/dist-packages/numba/tests/test_np_functions.py -v
The error summary is
======================================================================
ERROR: test_ediff1d_edge_cases (numba.tests.test_np_functions.TestNPFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/numba/tests/test_np_functions.py", line 2045, in test_ediff1d_edge_cases
_check_raises_type_error(params, 'to_begin')
File "/usr/lib/python3/dist-packages/numba/tests/test_np_functions.py", line 2012, in _check_raises_type_error
pyfunc(**params)
File "/usr/lib/python3/dist-packages/numba/tests/test_np_functions.py", line 229, in ediff1d
return np.ediff1d(ary, to_end, to_begin)
File "<__array_function__ internals>", line 5, in ediff1d
File "/usr/lib/python3/dist-packages/numpy/lib/arraysetops.py", line 107, in ediff1d
raise TypeError("dtype of `to_end` must be compatible "
TypeError: dtype of `to_end` must be compatible with input `ary` under the `same_kind` rule.
This is with numpy 1.19 which has only just been released, so I’m wondering if it’s an adjustment which numba needs to make in test_ediff1d_edge_cases to work with the new numpy.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
numpy.ediff1d — NumPy v1.24 Manual
The differences between consecutive elements of an array. Parameters: aryarray_like. If necessary, will be flattened before the differences are taken. to_end ...
Read more >I have a Python error when importing the numpy module
I have installed numpy and all other modules needed using pip in the commandprompt. But I still get a error, I've tried to...
Read more >NumPy: doc/changelog/1.19.0-changelog.rst | Fossies
#15115: MAINT: random: Remove a few unused imports from test files. #15116: MAINT: Bump pytest from 5.3.1 to 5.3.2; #15118: API: remove undocumented...
Read more >jax.numpy.ediff1d - JAX documentation - Read the Docs
Original docstring below. Parameters. ary (array_like) – If necessary, will be flattened before the differences are taken. to_end (array_like ...
Read more >Astropy Documentation - Read the Docs
You will need a compiler suite and the development headers for Python and Numpy in order to build Astropy. On. Linux, using the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just tried writing the patch to make this work and discovered https://github.com/numpy/numpy/pull/17457
Confirmed, still failing with numpy 1.91.1.