Much like https://github.com/pystatgen/sgkit-bgen/pull/15, this reader should break if you try to index with scalars (ds.call_genotype[0, 0]) or lists. More problematic is the fact that Dask will request slices as scalar indices if a variant/sample chunk only has one item. Adding fancy=False to from_array, converting int slicers to actual slices, and then squeezing off unit dimensions in the chunks read is enough to fix these problems.
Much like https://github.com/pystatgen/sgkit-bgen/pull/15, this reader should break if you try to index with scalars (
ds.call_genotype[0, 0]
) or lists. More problematic is the fact that Dask will request slices as scalar indices if a variant/sample chunk only has one item. Addingfancy=False
tofrom_array
, converting int slicers to actual slices, and then squeezing off unit dimensions in the chunks read is enough to fix these problems.