Conversation
|
I just did a small test and discovered that it doesn't work for the views. using DiskArrays: ReshapedDiskArray, PermutedDiskArray
using DiskArrays.TestTypes
a = AccessCountDiskArray(reshape(1:24, 2, 3, 4), chunksize=(2, 2, 2))
a[CartesianIndex(1, 2), 1:end] # works now
@view a[CartesianIndex(1, 2), 1:end] # failsI don't think I need the functionality but I just wanted to share it right away before I forget. |
|
In the latest push? I tried to fix view too, it works in the tests now. Have to check why this argument combo doesn't work. |
|
Yes in the latest commit on this branch. The error comes from "DiskArrays.jl/src/subarray.jl:65"
|
|
Ok thanks, I'll fix that tomorrow or monday |
|
Ok so it turns out this fails with any array at all! Its just julias @view a[CartesianIndex(1, 2), 1:end] # fails |
Interesting, I will add an issue to the Julia repository to document this. a = reshape(1:(2*3*4),(4,3,2))
a[CartesianIndex(1, 2), :] # works
a[1,2, 1:end] # works
a[CartesianIndex(1, 2), 1:end] # fails |
|
Ok, I finally understood the bug. It was not view-related but could be induced by a getindex on a normal DiskArray as well when indexing with a longer |
Fixes #259
@lupemba hopefully this solves your issue