You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically speaking Zarr does not support fancy indexing with either a
list of indices or a boolean array. If your data are not too big then you
can do as you showed, i.e., z[:][indices], however note that z[:] has the
effect of loading the entire array into memory as a numpy array, and so it
is numpy that is providing the fancy indexing.
If you want out-of-core fancy indexing then you can try dask.array. I.e.,
da.from_array(z, chunks=z.chunks)[indices].compute(optimize_graph=False)
should give the same result, but will not load all data into memory at the
same time. Note that the best way to do this via dask may change in a
future release, see also dask/dask#1528.
Activity
ankravch commentedon Sep 23, 2016
ok, it does
alimanfoo commentedon Sep 23, 2016
Hi @ankravch,
Technically speaking Zarr does not support fancy indexing with either a
list of indices or a boolean array. If your data are not too big then you
can do as you showed, i.e., z[:][indices], however note that z[:] has the
effect of loading the entire array into memory as a numpy array, and so it
is numpy that is providing the fancy indexing.
If you want out-of-core fancy indexing then you can try dask.array. I.e.,
da.from_array(z, chunks=z.chunks)[indices].compute(optimize_graph=False)
should give the same result, but will not load all data into memory at the
same time. Note that the best way to do this via dask may change in a
future release, see also dask/dask#1528.
Hth,
Alistair
On Friday, September 23, 2016, ankravch [email protected] wrote:
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health http://cggh.org
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Email: [email protected]
Web: http://purl.org/net/aliman
Twitter: https://twitter.com/alimanfoo
Tel: +44 (0)1865 287721