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

dask.array.tensordot bug: negative values in argument axes give wrong results. #10811

Open
joanrue opened this issue Jan 17, 2024 · 0 comments · May be fixed by #10812
Open

dask.array.tensordot bug: negative values in argument axes give wrong results. #10811

joanrue opened this issue Jan 17, 2024 · 0 comments · May be fixed by #10812
Labels
needs triage Needs a response from a contributor

Comments

@joanrue
Copy link
Contributor

joanrue commented Jan 17, 2024

Describe the issue:
While numpy.tensordot accepts negative axes, negative axes in dask.array.tensordot give wrong results.

Minimal Complete Verifiable Example:

import numpy as np
import dask.array as da

rng = np.random.default_rng()
a = rng.normal(size=(30, 10))
b = rng.normal(size=(10, 20))

kwargs = dict(axes=[[-1], [0]])
np_z = np.tensordot(a, b, **kwargs)
da_z = da.tensordot(da.array(a), da.array(b), **kwargs)
print(np_z.shape) 
# (30, 20) 
print(da_z.shape)
# (30, 1)
@github-actions github-actions bot added the needs triage Needs a response from a contributor label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs a response from a contributor
Projects
None yet
1 participant