Skip to content

Commit

Permalink
Add support for _normalizeindex with OneTo
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Dec 9, 2022
1 parent ffeb27a commit bb9302a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/variable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ function Base.setindex!(v::Variable{T,N},data::AbstractArray{T2,N},indexes::Colo
return data
end


_normalizeindex(n,ind::Base.OneTo) = 1:1:ind.stop
_normalizeindex(n,ind::Colon) = 1:1:n
_normalizeindex(n,ind::Int) = ind:1:ind
_normalizeindex(n,ind::UnitRange) = StepRange(ind)
Expand Down

0 comments on commit bb9302a

Please sign in to comment.