Open an array using file-mode-like semantics.
Usage
zarr_open_array(
store = NA,
storage_options = NA,
mode = NA,
shape = NA,
chunks = TRUE,
dtype = NA,
compressor = NA,
fill_value = NA,
order = NA,
synchronizer = NA,
overwrite = FALSE,
path = NA,
chunk_store = NA,
filters = NA,
cache_metadata = TRUE,
cache_attrs = TRUE,
object_codec = NA,
dimension_separator = NA,
write_empty_chunks = TRUE
)
Arguments
- store
: MutableMapping or string Store or path to directory in file system or name of zip file.
- storage_options
: dict If using an fsspec URL to create the store, these will be passed to the backend implementation. Ignored otherwise.
- mode
: 'r', 'r+', 'a', 'w', 'w-', optional Persistence mode: 'r' means read only (must exist); 'r+' means read/write (must exist); 'a' means read/write (create if doesn't exist); 'w' means create (overwrite if exists); 'w-' means create (fail if exists).
- shape
: int or tuple of ints Array shape.
- chunks
: int or tuple of ints, optional Chunk shape. If True, will be guessed from
shape
anddtype
. If False, will be set toshape
, i.e., single chunk for the whole array. If an int, the chunk size in each dimension will be given by the value ofchunks
. Default is True.- dtype
: string or dtype, optional NumPy dtype.
- compressor
: Codec, optional Primary compressor.
- fill_value
: object Default value to use for uninitialized portions of the array.
- order
: 'C', 'F', optional Memory layout to be used within each chunk.
- synchronizer
: object, optional Array synchronizer.
- overwrite
: bool, optional If True, delete all pre-existing data in
store
atpath
before creating the array.- path
: string, optional Path under which array is stored.
- chunk_store
: MutableMapping, optional Separate storage for chunks. If not provided,
store
will be used for storage of both chunks and metadata.- filters
: sequence of Codecs, optional
- cache_metadata
: bool, optional If True, array configuration metadata will be cached for the lifetime of the object. If False, array metadata will be reloaded prior to all data access and modification operations (may incur overhead depending on storage and data access pattern).
- cache_attrs
: bool, optional If True (default), user attributes will be cached for attribute read operations. If False, user attributes are reloaded from the store prior to all attribute read operations.
- object_codec
: Codec, optional A codec to encode object arrays, only needed if dtype=object.
- dimension_separator
: '.', '/', optional Separator placed between the dimensions of a chunk.
- write_empty_chunks
: bool, optional If True (default), all chunks will be stored regardless of their contents. If False, each chunk is compared to the array's fill value prior to storing. If a chunk is uniformly equal to the fill value, then that chunk is not be stored, and the store entry for that chunk's key is deleted. This setting enables sparser storage, as only chunks with non-fill-value data are stored, at the expense of overhead associated with checking the data of each chunk.