caterva.empty#
- caterva.empty(shape, itemsize, **kwargs)#
Create an empty array.
- Parameters
- shape: tuple or list
The shape for the final array.
- itemsize: int
The size, in bytes, of each element.
- Returns
- out: NDArray
A NDArray is returned.
- Other Parameters
- kwargs: dict, optional
Keyword arguments supported:
- chunks: iterable object or None
The chunk shape. If None, the array is stored using a non-compressed buffer. (Default None)
- blocks: iterable object or None
The block shape. If None, the array is stored using a non-compressed buffer. (Default None)
- urlpath: str or None
The name of the file to store data. If None, data is stored in-memory. (Default None)
- contiguous: bool or None
Whether the data is stored contiguously or sparsely (one chunk per file). If None, data is stored sparsely.
- memframe: bool
If True, the array is backed by a frame in-memory. Else, by a super-chunk. (Default: False)
- meta: dict or None
A dictionary with different metalayers. One entry per metalayer:
- key: bytes or str
The name of the metalayer.
- value: object
The metalayer object that will be (de-)serialized using msgpack.
- codec:
Codec
The name for the compressor codec. (Default:
Codec.LZ4
)- clevel: int (0 to 9)
The compression level. 0 means no compression, and 9 maximum compression. (Default: 5)
- filters: list
The filter pipeline. (Default: [
Filter.SHUFFLE
])- filtersmeta: list
The meta info for each filter in pipeline. (Default: [0])
- nthreads: int
The number of threads. (Default: 1)
- usedict: bool
If a dictionary should be used during compression. (Default: False)