-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make LinearIndices consistent with linearindices for vectors (#26682)
Change LinearIndices(x::AbstractVector) to use the same indices as axes(x, 1). This is consistent with linearindices(x) and allows indexing into x. Change CartesianIndices to use custom axes so that it works with indices returned by LinearIndices for vectors. Use IndexLinear indexing for LinearIndices Add bounds check to getindex for LinearIndices and CartesianIndices.
- Loading branch information
Showing
3 changed files
with
22 additions
and
17 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