meggart / DiskArrays.jl

Other
72 stars 13 forks source link

fix undef writes for steprange #172

Closed rafaqz closed 3 months ago

rafaqz commented 3 months ago

This PR fixes NCDatasets.jl for DiskArrays 0.4, and closes #171.

Currently we are writing undef over correct values in the array when we use a StepRange in setindex!, which is not great.

The change I made is to just pass the StepRange indices to the backend and let it handle them. Are there any cases that can hit this branch where that is not possible? (Maybe Zarr?) If so we will need a trait to mark that capability, and do the interleaving ourselves to remove the undefs for the cases where it is not.

But @meggart I'm not sure if this was anything like the intended behavior?

Clearly it doesn't work, and needs some kind of additional conditionals/handling.

meggart commented 3 months ago

Thanks for starting this. I did have a look at the problem and I think the bug happens earlier in some interpret_indices method. I will investigate further...

meggart commented 3 months ago

The issue should be fixed here #173 , so I would close this in favor of the other PR