dask: dask array failing with numpy 1.17.0rc1 and np.min
Using Python 3.7, dask 2.0, (from conda-forge) and NumPy 1.17.0rc1 (from pip):
import numpy as np
import dask.array as da
image = da.from_array(np.array([[0, 1], [1, 2]]), chunks=(1, 2))
image_min = int(np.min(image))
results in:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<__array_function__ internals>", line 6, in amin
TypeError: no implementation found for 'numpy.amin' on types that implement __array_function__: [<class 'dask.array.core.Array'>]
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (13 by maintainers)
Commits related to this issue
- Add amin/amax aliases to min/max in dask array Fixes #5031 — committed to mrocklin/dask by mrocklin 5 years ago
- Add regression tests for gh-5031 (__array_function__ min/amin alias) — committed to rgommers/dask by rgommers 5 years ago
- Deal with numpy aliases and functions and numpy functions not in dask See gh-5031 for discussion. — committed to rgommers/dask by rgommers 5 years ago
- Deal with numpy aliases and functions and numpy functions not in dask See gh-5031 for discussion. Note that decorating all functions is not yet complete; this is enough to show tests in `test_numpy_c... — committed to rgommers/dask by rgommers 5 years ago
- Change __array_function__ implementation for backwards compatibility (#5043) * Add regression tests for #5031 (__array_function__ min/amin alias) * Deal with numpy aliases and functions and numpy fu... — committed to dask/dask by rgommers 5 years ago
Closing as Dask 2.1.0 is out which includes the fix from #5043. Thanks all!
That’s not true:
It’s not less typing, but it distributes the mapping alongside each function, rather than centralizing it. That means that it’s easier to spot a missing map entry.
The name is lousy, but it’s up to dask to pick that 😃
It may not be too late to change
TypeError
with a warning + old behavior.