Skip to content

Commit

Permalink
Restrict to arrays of numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Oct 16, 2020
1 parent 680bd02 commit 47b8401
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rulesets/Base/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##### getindex
#####

function rrule(::typeof(getindex), x::Array, inds...)
function rrule(::typeof(getindex), x::Array{<:Number}, inds...)
# removes any logical indexing, CartesianIndex etc
# leaving us just with a tuple of Int, Arrays of Int and Ranges of Int
plain_inds = Base.to_indices(x, inds)
Expand Down

0 comments on commit 47b8401

Please sign in to comment.