-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Python Bindings didn't allow for zero-D Funcs, ImageParams, Buffers #6633
Conversation
There were no overloads or tests for accessing the element of any of these in the zero-D case, and the obvious syntax (`[]`, to mirror C++ `()` in these cases) isn't legal in Python. To support this uncommon-but-necessary case, I'm proposing that we use the syntax `[None]`, which isn't pretty, but is less bad than other options I've considered so far. (Suggestions welcome.)
An alternative to None might be the empty tuple: [()] |
|
FWIW, |
Final votes on syntax? |
On second thought, we shouldn't use https://numpy.org/doc/stable/reference/constants.html#numpy.newaxis |
PTAL |
There were no overloads or tests for accessing the element of any of these in the zero-D case, and the obvious syntax (
[]
, to mirror C++()
in these cases) isn't legal in Python. To support this uncommon-but-necessary case, I'm proposing that we use the syntax,[None]
[()]
, which isn't pretty, but is less bad than other options I've considered so far. (Suggestions welcome.)