8000 TST: Test dimensions/indices found from parsed gufunc signatures. by mhvk · Pull Request #11178 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

TST: Test dimensions/indices found from parsed gufunc signatures. #11178

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 1 commit into from
May 29, 2018

Conversation

mhvk
Copy link
Contributor
@mhvk mhvk commented May 28, 2018

Another split-off from #11132 - expanded signature testing.

enabled, num_dims, ixs = umt.test_signature(2, 1, "(i1,i2),(J_1)->(_kAB)")
assert_equal(enabled, 1)
assert_equal(num_dims, (2, 1, 1))
assert_equal(ixs, (0, 1, 2, 3))
Copy link
Member

Choose a reason for hiding this comment

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

Might be nicer to build a nested tuple here, and I don't envisage it being any harder

Copy link
Member
@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

One suggestion, but fine to merge as is

@mhvk
Copy link
Contributor Author
mhvk commented May 28, 2018

I think for the testing purposes here it is perhaps better to just give back what the ufunc contains. I have been wondering more generally, though, about some way to expose this information -- maybe as simple as a nicer __repr__ -- and then I think it would be good to distinguish more clearly.

@mhvk mhvk force-pushed the gufunc-signature-testing-improvement branch from c1233ed to d0e5e39 Compare May 28, 2018 17:41
@mhvk
Copy link
Contributor Author
mhvk commented May 28, 2018

@mattip - are you happy with this going in separately? (I do apologize for hijacking your PR...)

@eric-wieser
Copy link
Member

for the testing purposes here it is perhaps better to just give back what the ufunc contains

Arguably the ufunc just contains a representation of nested tuple, split between num_dims and idx. So I'd maybe just return (core_enabled, tuple_of_idx).

I don't feel strongly about this - looks like a good thing to test however you spell it

@mattip
Copy link
Member
mattip commented May 29, 2018

LGTM, breaking the larger work into a number of smaller PRs is the way to go

@eric-wieser eric-wieser merged commit b1cb954 into numpy:master May 29, 2018
@mhvk mhvk deleted the gufunc-signature-testing-improvement branch May 29, 2018 12:45
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.

3 participants
0