-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
ENH: Add frozen dimensions to gufunc signatures #5015
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
Conversation
This adds the possibility of including numbers in the signature of a gufunc. These dimensions then become frozen at that value, and passing in an array with a different sized dimension will raise an error. To demonstrate it, a
Needs some tests. |
Needs to wait a bit to give the mailing list time to chime in. Needs docs. Needs tests, as you say. In particular in addition to tests for |
Also you have universal test failures on Travis. |
0ee8860
to
58fef9b
Compare
58fef9b
to
64267ce
Compare
Man that was tough to track down! Travis seem to be happier now... |
Aside from the fact that it finally seems to be working without crashes or leaks, I fully agree on taking things slowly, and coming up with a well designed solution. Even if this is a small-ish, self-contained change, there is no rush. |
hm this breaks ABI and C-API by extending the ufunc structure again (users might be doing the same from_pyfunc does) , though I want to do that too in another change. |
I will eventually want another function pointer, for computed output dimensions, so I am +1 on anything that allows changing things with more freedom. Hiding my array of My first thought after figuring out my |
This appears to be stalled. Was there ever a follow on issue, PR, or further discussion that I might peruse? This sort of thing has been requested in dask.array and I'm thinking through how best to handle it in a way that might be future proof to further numpy developments. |
We might also need this to implement #8720, since sometimes the output is defined to be size |
This was superseded by the NEP-20 PRs, thanks for the idea which in the end was implemented! |
No description provided.