Skip to content
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

NamedArray.shape does not support unknown dimensions #8291

Closed
headtr1ck opened this issue Oct 10, 2023 · 1 comment · Fixed by #8294
Closed

NamedArray.shape does not support unknown dimensions #8291

headtr1ck opened this issue Oct 10, 2023 · 1 comment · Fixed by #8294
Labels
enhancement topic-NamedArray Lightweight version of Variable

Comments

@headtr1ck
Copy link
Collaborator

What is your issue?

According to the array api standard, the shape property returns tuple[int | None, ...].
Currently we only support tuple[int, ...]

This will actually raise some errors if a duckarray actually returns some None.
E.g. NamedArray.size will fail.

(On a side note: dask arrays actually use NaN instead of None for some reason.... Only advantage of this is that NamedArray.size will actually also return NaN instead of raising...)

@headtr1ck headtr1ck added enhancement topic-NamedArray Lightweight version of Variable labels Oct 10, 2023
@TomNicholas
Copy link
Contributor

TomNicholas commented Oct 10, 2023

(On a side note: dask arrays actually use NaN instead of None for some reason.... Only advantage of this is that NamedArray.size will actually also return NaN instead of raising...)

Linking to more info on this, and the connection to ragged arrays: #4285 (comment)

also xref #5168, #2801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement topic-NamedArray Lightweight version of Variable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants