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

use SOneTo for eachindex() #819

Merged
merged 1 commit into from
Sep 16, 2020
Merged

Conversation

stev47
Copy link
Contributor

@stev47 stev47 commented Aug 25, 2020

Currently we already have eachindex(SA[1, 2, 3, 4]) isa SOneTo for
vectors but not for matrices. This changes makes eachindex consistent.

Currently we already have `eachindex(SA[1, 2, 3, 4]) isa SOneTo` for
vectors but not for matrices. This changes makes `eachindex` consistent.
@stev47
Copy link
Contributor Author

stev47 commented Aug 25, 2020

the ci failure seems unrelated

@mateuszbaran mateuszbaran linked an issue Aug 26, 2020 that may be closed by this pull request
@c42f
Copy link
Member

c42f commented Sep 16, 2020

I think this is fine 👍

Side note — a more fundamental fix to this in the future might be to use a StaticInteger, thus,

Base.length(s::StaticArray) = static(prod(Size(s)))

@c42f c42f merged commit 4295986 into JuliaArrays:master Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eachindex and SOneTo
3 participants