Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

einsum doesn't handle dtype and optimize kwargs #589

Closed
dcherian opened this issue Apr 17, 2023 · 2 comments
Closed

einsum doesn't handle dtype and optimize kwargs #589

dcherian opened this issue Apr 17, 2023 · 2 comments
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@dcherian
Copy link

dcherian commented Apr 17, 2023

Describe the bug
I tried to use np.einsum on a combination of dask and sparse arrays. I get

TypeError: einsum() got an unexpected keyword argument 'dtype'

To Reproduce

import dask
import dask.array as da

data = dask.array.ones((5,5))

wgts = sparse.COO(coords=(0,1,2,3,4), data=[1, 1, 0.5, 1, 1], shape=(5,))
np.einsum('ij,i-> j', data, wgts)

Expected behavior
The output should match the pure numpy version

np.einsum('ij,i-> j', data.compute(), wgts.todense())
array([4.5, 4.5, 4.5, 4.5, 4.5])

System

  • OS and version: macOS 13.3
  • sparse version 0.14.0
  • NumPy version (np.__version__): 1.23.5
  • Numba version (numba.__version__): 0.56.4

Additional context
Add any other context about the problem here.

@dcherian dcherian added the bug Indicates an unexpected problem or unintended behavior label Apr 17, 2023
@hameerabbasi
Copy link
Collaborator

@mtsokol Again, would this be something you'd be interested in?

@mtsokol
Copy link
Collaborator

mtsokol commented Jan 5, 2024

Sure! I can take care of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants