Skip to content

Conversation

@Tokazama
Copy link
Member

  • New support for types from Base.Iterators
  • Check for Base.IteratorSize before assuming we can rely on axes when
    finding the size.
  • Update internal calculation of range length to match base

* New support for types from `Base.Iterators`
* Check for `Base.IteratorSize` before assuming we can rely on axes when
  finding the size.
* Update internal calculation of range length to match base
@codecov
Copy link

codecov bot commented Jan 11, 2022

Codecov Report

Merging #236 (4bdd887) into master (ca6cfd1) will increase coverage by 0.18%.
The diff coverage is 98.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
+ Coverage   89.01%   89.20%   +0.18%     
==========================================
  Files          11       11              
  Lines        1730     1750      +20     
==========================================
+ Hits         1540     1561      +21     
+ Misses        190      189       -1     
Impacted Files Coverage Δ
src/ranges.jl 91.12% <94.73%> (-0.48%) ⬇️
src/ArrayInterface.jl 90.26% <100.00%> (+0.15%) ⬆️
src/dimensions.jl 97.85% <100.00%> (+0.14%) ⬆️
src/size.jl 87.87% <100.00%> (+7.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca6cfd1...4bdd887. Read the comment docs.

@Tokazama Tokazama requested a review from chriselrod January 11, 2022 16:11
Use length methods for all non `HasShape` iterators and error or
evaluate there
Copy link
Collaborator

@chriselrod chriselrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People have consistently found indices confusing, although I like it.
So it's probably nice to support more methods.
Also, not redundant, as this gives us sizes instead of an axis.

@Tokazama
Copy link
Member Author

People have consistently found indices confusing, although I like it. So it's probably nice to support more methods. Also, not redundant, as this gives us sizes instead of an axis.

I can also add indices and ArrayInterface.axes support for iterators. I just didn't immediately need it so I didn't think of that

@chriselrod
Copy link
Collaborator

chriselrod commented Jan 13, 2022

People have consistently found indices confusing, although I like it. So it's probably nice to support more methods. Also, not redundant, as this gives us sizes instead of an axis.

I can also add indices and ArrayInterface.axes support for iterators. I just didn't immediately need it so I didn't think of that

No need. I was just commenting on the known_size(zip(...)) tests.

@Tokazama Tokazama merged commit 0bcc1b5 into master Jan 13, 2022
@Tokazama Tokazama deleted the iterator_support branch January 13, 2022 23:23
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.

3 participants