-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Milestone
Description
Currently when numpy arrays interact with dask arrays we swallow errors silently, revealing them only at computation time.
In [1]: import dask.array as da
In [2]: import numpy as np
In [3]: x = da.arange(15, chunks=5)
In [4]: y = np.arange(15)
In [5]: x + y
Out[5]: dask.array<x_1, shape=(15,), chunks=((5, 5, 5)), dtype=int64>
In [6]: _.compute()
ValueError: operands could not be broadcast together with shapes (5,) (15,) We should do one of the following things:
- Figure out automatic conversion of a numpy array into a dask array with appropriate shape to make the operation work (hard in general, maybe easy in a few key cases)
- Raise an informative error early on (maybe easier in the hard cases)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels