Closed josuemtzmo closed 1 week ago
Hello,
thanks for reporting this bug, which I could reproduce on my machine.
While I don't have the fix to the issue, I wanted to suggest to test, instead of
ds["temperature"][:,:][:,end:-1:1]
the function reverse()
, so in this case it would be
T = reverse(ds["temperature"][:,:], dims=2)
Hi Josué, thank you for your detailed and reproducible bug report. I just committed this fix 968ebbf to allow negative strides.
Do you have the time to test this for your use case, before I make a new release?
I've checked with the last commit and the code was now working with negative strides.
Apologies for the delay, I have checked with the last commit and the code works with negative strides! Thank you so much!!
Thanks you for confirming!
Describe the bug
Loading an inverted subset doesn't work, it outputs an error of illegal stride:
A few versions ago, this worked (I believed the version v0.13.2 allowed this operation)
The only way I manage to fix it is by extracting the array and then inverting it:
Isn't this a bit redundant?
To Reproduce
ds = NCDataset("file.nc","c")
ds["temperature"][:,end:-1:1]
Expected behavior
ds["temperature"][:,end:-1:1]
should work.Environment
Full output