Skip to content

Commit

Permalink
Merge pull request #195 from charleskawczynski/ck/normalize_ind
Browse files Browse the repository at this point in the history
Add support for `_normalizeindex` with `Base.OneTo`
  • Loading branch information
Alexander-Barth authored Dec 9, 2022
2 parents ffeb27a + bb9302a commit 95786f9
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

2 comments on commit 95786f9

@Alexander-Barth
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/73823

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.12.10 -m "<description of version>" 95786f9d8501741253ccabe1bf20f19f2b9f03b0
git push origin v0.12.10

Please sign in to comment.