-
Notifications
You must be signed in to change notification settings - Fork 44
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 with end
fails in simple cases
#195
Comments
You can't use There is a good argument to be made to move away from using You can use |
Ah that's unfortunate. Being able to do things like I tried digging into the source code but couldn't figure out how to make The |
That's probably because I didn't write the crash course, and I already had to edit it a lot ;) But yes it should be removed! We could add an object |
This package might help you: |
Also see: JuliaLang/julia#38296 |
Ah neat, did not know about EndpointRanges.jl! Will look into it. I guess Python/xarray gets away with it in this case because Python always assumes that arrays start at 0 so Feel free to close this issue (or maybe you want to keep it open until |
Its annoying me this doesn't work and we need to load another package to make it work. We should repurpose |
I tend to index using
end
a lot, e.g. to get the output at the last time step. But it seems to fail in some simple cases.A[X(1:3:end), Ti(1:2:end)]
(taken from the docs: https://rafaqz.github.io/DimensionalData.jl/dev/course/#Indexing-the-array-by-name-and-index) works but notA[X(1:3:end)]
,A[Y(1:2:end)]
,A[X(1:end)]
,A[X=1:end]
,A[X=end]
, andA[X(end)]
, etc.Minimal working examples
Julia environment
The text was updated successfully, but these errors were encountered: