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

doc: an inconsistency: is size guaranteed to be defined for iterators with HasShape? #54290

Open
nsajko opened this issue Apr 28, 2024 · 1 comment
Labels
design Design of APIs or of the language itself domain:docs This change adds or pertains to documentation kind:bug Indicates an unexpected problem or unintended behavior

Comments

@nsajko
Copy link
Contributor

nsajko commented Apr 28, 2024

The size doc string says:

Note that size may not be defined for arrays with non-standard indices, in which case axes may be useful.

This contradicts the Interfaces page in the Manual, which says that size should be defined when:

If Base.IteratorSize() returns Base.HasShape{N}()

@nsajko nsajko added kind:bug Indicates an unexpected problem or unintended behavior domain:docs This change adds or pertains to documentation design Design of APIs or of the language itself labels Apr 28, 2024
@jishnub
Copy link
Contributor

jishnub commented Apr 28, 2024

I don't think the size docstring is accurate, as the AbstractArray interface necessarily requires size to be defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design of APIs or of the language itself domain:docs This change adds or pertains to documentation kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants