Skip to content

TST: Added tests for np.tensordot() #12152

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

Merged
merged 2 commits into from
Feb 24, 2019
Merged

TST: Added tests for np.tensordot() #12152

merged 2 commits into from
Feb 24, 2019

Conversation

rishacha
Copy link

Added test for np.tensordot() to test the function when there are no well defined axes present.

Ref: Github issue #12130

Added test for np.tensordot() to test the function when there are no well defined axes present.

Github issue #12130
@rishacha
Copy link
Author

I need some help with changing the documentation.

@@ -2748,3 +2748,7 @@ def test_zero_dimension(self):
td = np.tensordot(a, b, (1, 0))
assert_array_equal(td, np.dot(a, b))
assert_array_equal(td, np.einsum('ij,jk', a, b))
# Test resolution to issue #12130
Copy link
Member

Choose a reason for hiding this comment

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

Could be spelled simply "gh-12130"

Copy link
Member

@eric-wieser eric-wieser Feb 24, 2019

Choose a reason for hiding this comment

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

Better to do it the gh- way - the tests are littered with references to different historical issue trackers - it's always nice to know which issue tracker they were referring to, just in case we change again.

@mattip
Copy link
Member

mattip commented Oct 15, 2018

The documentation lives in numpy/core/numeric.py, in the docstring of the function. It would be good to add something like "Empty array-like is equivalent to default behavior" to the axes parameter text.

@eric-wieser
Copy link
Member

It would be good to add something like "Empty array-like is equivalent to default behavior

Except this is not true, so let's not add that.

@eric-wieser
Copy link
Member

@rishacha: Ping - mattip mentions above where to find the documentation.

@eric-wieser
Copy link
Member

Fixed the comment and split this into a new test. If @rishacha wants to add docs, he can do so in another PR.

@eric-wieser eric-wieser merged commit 3a75d86 into numpy:master Feb 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants