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

Out of bounds indexing does not throw BoundsError? #426

Open
asinghvi17 opened this issue Aug 22, 2024 · 0 comments
Open

Out of bounds indexing does not throw BoundsError? #426

asinghvi17 opened this issue Aug 22, 2024 · 0 comments
Labels
question Further information is requested

Comments

@asinghvi17
Copy link

I accidentally indexed an 800x800x163 ish Zarr based YAXArray (pure Julia) by 1:1000, 1:1000, 1:15. This didn't throw a BoundsError as expected - instead, the operation went on silently, and when it came time to materialize the array threw the following error:


ERROR: ArgumentError: The array ZArray{Int16} of size 833 x 833 x 119 got missing chunks and no fill_value
Stacktrace:
  [1] uncompress_raw!(a::Array{…}, z::ZArray{…}, curchunk::Nothing)
    @ Zarr ~/.julia/dev/kerchunk-project/Zarr/src/ZArray.jl:262
  [2] uncompress_to_output!(aout::Array{…}, output_base_offsets::Tuple{…}, z::ZArray{…}, chunk_compressed::Nothing, current_chunk_offsets::Tuple{…}, a::Array{…}, indranges::Tuple{…})
    @ Zarr ~/.julia/dev/kerchunk-project/Zarr/src/ZArray.jl:275
  [3] readblock!(aout::Array{…}, z::ZArray{…}, r::CartesianIndices{…})
    @ Zarr ~/.julia/dev/kerchunk-project/Zarr/src/ZArray.jl:180
  [4] readblock!(::ZArray{…}, ::Array{…}, ::UnitRange{…}, ::Vararg{…})
    @ Zarr ~/.julia/dev/kerchunk-project/Zarr/src/ZArray.jl:249
  [5] getindex_disk_nobatch!(out::Nothing, a::ZArray{…}, i::Tuple{…})
    @ DiskArrays ~/.julia/packages/DiskArrays/6JA8Z/src/diskarray.jl:236
  [6] getindex_disk!
    @ ~/.julia/packages/DiskArrays/6JA8Z/src/diskarray.jl:252 [inlined]
  [7] getindex_disk
    @ ~/.julia/packages/DiskArrays/6JA8Z/src/diskarray.jl:210 [inlined]
  [8] getindex(::ZArray{…}, ::UnitRange{…}, ::UnitRange{…}, ::UnitRange{…})
    @ DiskArrays ~/.julia/packages/DiskArrays/6JA8Z/src/diskarray.jl:348
  [9] readblock!(::DiskArrayTools.CFDiskArray{…}, ::Array{…}, ::UnitRange{…}, ::Vararg{…})
    @ DiskArrayTools ~/.julia/packages/DiskArrayTools/141OI/src/DiskArrayTools.jl:268
 [10] getindex_disk_nobatch!(out::Nothing, a::DiskArrayTools.CFDiskArray{…}, i::Tuple{…})
    @ DiskArrays ~/.julia/packages/DiskArrays/6JA8Z/src/diskarray.jl:236
 [11] getindex_disk!
    @ ~/.julia/packages/DiskArrays/6JA8Z/src/diskarray.jl:252 [inlined]
 [12] getindex_disk
    @ ~/.julia/packages/DiskArrays/6JA8Z/src/diskarray.jl:210 [inlined]
 [13] getindex
    @ ~/.julia/packages/DiskArrays/6JA8Z/src/diskarray.jl:348 [inlined]
 [14] getindex(A::YAXArray{…}, i1::UnitRange{…}, i2::UnitRange{…}, Is::UnitRange{…})
    @ DimensionalData ~/.julia/packages/DimensionalData/RxCda/src/array/indexing.jl:130
 [15] top-level scope
    @ ~/.julia/packages/BenchmarkTools/QNsku/src/execution.jl:496
Some type information was truncated. Use `show(err)` to see complete types.

Not sure what the best solution is, I'll push an MWE tomorrow.

@lazarusA lazarusA added the question Further information is requested label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants