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

BUG: support axes argument in np.linalg.tensordot #25554

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

jakevdp
Copy link
Contributor

@jakevdp jakevdp commented Jan 8, 2024

This is broken at HEAD because of a typo in _tensordot_dispatcher:

In [1]: import numpy as np

In [2]: np.__version__
Out[2]: '2.0.0.dev0+git20240106.42fef42'

In [3]: x = np.arange(6).reshape((2, 3))

In [4]: np.linalg.tensordot(x, x, axes=2)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 np.linalg.tensordot(x, x, axes=2)

TypeError: tensordot() got an unexpected keyword argument 'axes'

@jakevdp jakevdp changed the title Support axes argument in np.linalg.tensordot BUG: support axes argument in np.linalg.tensordot Jan 8, 2024
Copy link
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks obviously correct to me, so approving, but just to be sure let me ping @mtsokol, who added this.

@ngoldbaum
Copy link
Member

Merging, this was a typo that wasn't caught in review.

@mtsokol it might be a good idea to generate a coverage report (see #24992 for a WIP PR you could help review that adds the ability to generate a coverage report from spin) with an eye towards the array API additions, looking for untested code paths or things like the __array_function__ dispatcher here.

@ngoldbaum ngoldbaum merged commit 042b6b4 into numpy:main Jan 8, 2024
62 of 64 checks passed
@ngoldbaum
Copy link
Member

Thanks @jakevdp!

@jakevdp jakevdp deleted the tensordot-axes branch January 8, 2024 21:05
@mtsokol
Copy link
Member

mtsokol commented Jan 8, 2024

Ah, sorry! Clearly a typo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants