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

Fix iteration over Axis #160

Merged
merged 2 commits into from
Aug 11, 2019
Merged

Fix iteration over Axis #160

merged 2 commits into from
Aug 11, 2019

Conversation

coroa
Copy link
Contributor

@coroa coroa commented May 29, 2019

Iterate over elements in the Axis instead of just returning the axis. Is in line with axes(Ax) = OneTo(<length of elems>) and length(Ax) = <length of elems>.

Also add Iterator{Size,Eltype} traits.

No tests are broken (that worked before).

Does this make sense?

coroa added 2 commits May 29, 2019 15:41
Iterate over elements in the Axis instead of just returning the axis. Is in line
with `axes(Ax) = OneTo(<length of elems>)` and `length(Ax) = <length of elems>`.

Also add `Iterator{Size,Eltype}` traits.

No tests are broken (that worked before).
@timholy
Copy link
Member

timholy commented Jun 1, 2019

Those lines are a bit puzzling. Added in 8cb003b. Do you remember why @Evizero?

@coroa
Copy link
Contributor Author

coroa commented Jun 25, 2019

Before the transition to 0.7, Axis didn't implement any iteration interface. To my knowledge, the currently implemented interface does not serve any purpose.

I would like to fix that by, either

  1. Forwarding iteration to the encapsulated type (this PR), or
  2. Removing the iteration functions, alltogether

What's the next steps?

@timholy timholy merged commit a5556f1 into JuliaArrays:master Aug 11, 2019
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.

2 participants