We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eachindex
first
BoundsError
Minimal reproducer:
using Symbolics @variables x[0:2] first(x) # errors
Seems to be caused by this inconsistency:
julia> using Symbolics julia> @variables x[0:2] 1-element Vector{Symbolics.Arr{Num, 1}}: x[1:3] julia> ci = eachindex(x) CartesianIndices((0:2,)) julia> li = eachindex(IndexLinear(), x) 1:3 julia> first(ci) CartesianIndex(0,) julia> first(li) 1
Note that Base.first is currently implemented as first(a::AbstractArray) = a[first(eachindex(a))].
Base.first
first(a::AbstractArray) = a[first(eachindex(a))]
The text was updated successfully, but these errors were encountered:
Ahh I thought that @variables x[0:2] should error. Indexes not starting from 1 are not really supported
@variables x[0:2]
Sorry, something went wrong.
No branches or pull requests
Minimal reproducer:
Seems to be caused by this inconsistency:
Note that
Base.first
is currently implemented asfirst(a::AbstractArray) = a[first(eachindex(a))]
.The text was updated successfully, but these errors were encountered: