Skip to content

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

Merged
eric-wieser merged 1 commit into
numpy:masterfrom
mhvk:gufunc-signature-testing-improvement
May 29, 2018
Merged

eric-wieser merged 1 commit into
numpy:masterfrom
mhvk:gufunc-signature-testing-improvement

Conversation

@mhvk

@mhvk mhvk commented May 28, 2018

Copy link
Copy Markdown
Contributor

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

Comment thread numpy/core/tests/test_ufunc.py Outdated

Copy link
Copy Markdown
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

@eric-wieser eric-wieser left a comment

Copy link
Copy Markdown
Member

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

mhvk commented May 28, 2018

Copy link
Copy Markdown
Contributor Author

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

mhvk commented May 28, 2018

Copy link
Copy Markdown
Contributor Author

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

@eric-wieser

Copy link
Copy Markdown
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

mattip commented May 29, 2018

Copy link
Copy Markdown
Member

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