Skip to content
New issue

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

Indexing rows using end keyword errors #31

Open
kahaaga opened this issue Jul 26, 2024 · 0 comments
Open

Indexing rows using end keyword errors #31

kahaaga opened this issue Jul 26, 2024 · 0 comments

Comments

@kahaaga
Copy link
Member

kahaaga commented Jul 26, 2024

Describe the bug

Indexing a state space set with end keyword (e.g. x[1:end, 2:3]) errors. I'd expect this to work. Providing an explicit range (e.g. x[1:n, 2:3] does not error.

Minimal Working Example

julia> x = StateSpaceSet(rand(10, 2))
2-dimensional StateSpaceSet{Float64} with 10 points
 0.29452   0.423066
 0.461336  0.01487
 0.34901   0.568634
 0.225427  0.198393
 0.558053  0.901908
 0.101409  0.74085
 0.670569  0.656894
 0.384735  0.399064
 0.563578  0.54824
 0.176497  0.592265

julia> x[1:end, 2]
ERROR: MethodError: no method matching axes(::StateSpaceSet{2, Float64}, ::Int64)

Closest candidates are:
  axes(::Core.SimpleVector, ::Integer)
   @ Base essentials.jl:784
  axes(::Number, ::Integer)
   @ Base number.jl:83
  axes(::RecurrenceAnalysis.AbstractRecurrenceMatrix, ::Any...)
   @ RecurrenceAnalysis ~/.julia/packages/RecurrenceAnalysis/WMZHE/src/matrices/recurrence_matrix_types.jl:51
  ...

Stacktrace:
 [1] lastindex(a::StateSpaceSet{2, Float64}, d::Int64)
   @ Base ./abstractarray.jl:427
 [2] top-level scope
   @ REPL[15]:1

Package versions

This is on StateSpaceSets v1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant