-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify A[1, end] lowering with lastindex(A, n) (#25763)
This implements a new method of `lastindex` to specify a given dimension, and then uses that new method in the lowering of `end` within multi-dimensional indices. Previously, this would have lowered directly to `last(axes(A, d))` for `end` in position `d`. Given that `axes` (and multidimensional indexing generally) are array-centric concepts, I have only implemented this for `::AbstractArray`, with a deprecation for all other types suggesting implemention if sensible. I have similarly defined `firstindex(A, d)` - it will be available for its syntax transformation in the future.
- Loading branch information
1 parent
56b9593
commit eea727c
Showing
6 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters