You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe the purpose of the new feature or describe the problem to solve.
Sparse's tensordot only allows multiplication between sparse arrays and either scipy sparse arrays or numpy ndarrays.
It would be useful if other array-like objects were allowed.
For instance, in xarray, the dot function can only multiply a sparse DataArray and a dask DataArray if the einsum/tensordot function from dask is used: pydata/xarray#9934
Suggest a solution if possible.
The code for multiplying a COO matrix and a np.ndarray in _dot seems like it mostly relies on being able to infer the dtype, index, and create empty ndarrays, so it seems plausible that other array-like objects could be used here.
I haven't tried to implement this though.
If you have tried alternatives, please describe them below.
No response
Additional information that may help us understand your needs.
Please see this issue for further discussion in the context of xarray: pydata/xarray#9934
The text was updated successfully, but these errors were encountered:
Please describe the purpose of the new feature or describe the problem to solve.
Sparse's
tensordot
only allows multiplication between sparse arrays and either scipy sparse arrays or numpy ndarrays.It would be useful if other array-like objects were allowed.
For instance, in
xarray
, thedot
function can only multiply a sparseDataArray
and a daskDataArray
if the einsum/tensordot function from dask is used: pydata/xarray#9934Suggest a solution if possible.
The code for multiplying a
COO
matrix and anp.ndarray
in_dot
seems like it mostly relies on being able to infer the dtype, index, and create empty ndarrays, so it seems plausible that other array-like objects could be used here.I haven't tried to implement this though.
If you have tried alternatives, please describe them below.
No response
Additional information that may help us understand your needs.
Please see this issue for further discussion in the context of xarray: pydata/xarray#9934
The text was updated successfully, but these errors were encountered: