-
-
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.
Convert to_index before checkbounds in scalar indexing
I think the behavior here is more flexible and gives better error messages at the same time: ```jl julia> A[[]] 0-element Array{Int64,1} julia> A[im] ERROR: indexing Array{Int64,3} with types Tuple{Complex{Bool}} is not supported in error at ./error.jl:21 in getindex at abstractarray.jl:463 julia> A[[im]] ERROR: ArgumentError: unable to check bounds for indices of type Complex{Bool} in getindex at abstractarray.jl:463 julia> A[Vector[[1,2],[3,4]]] ERROR: ArgumentError: invalid index: Array{T,1}[[1,2],[3,4]] in getindex at abstractarray.jl:463 ```
- Loading branch information
Showing
3 changed files
with
27 additions
and
38 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