zcollection.variable.array.Array#
- class zcollection.variable.array.Array(name, data, dimensions, *, attrs=None, compressor=None, fill_value=None, filters=None)[source]#
Bases:
Variable
Access to the chunked data using numpy arrays.
- Parameters:
Attributes
Variable data as a dask array.
Variable attributes
Compressor used to compress the data during writing data to disk
Variable dimensions
Value to use for uninitialized values
Filters to apply before writing data to disk
Variable name
Return the numpy array wrapped in a dask array.
Return the dtype of the underlying array.
Return the number of bytes used by the variable.
Return the number of dimensions of the variable.
Return the shape of the variable.
Return the size of the variable.
Return the variable data as a numpy array.
Public Methods
compute
(**_)Return the variable data as a numpy array.
concat
(other, dim)Concatenate this variable with another variable or a list of variables along a dimension.
fill
()Fill the variable with the fill value.
from_zarr
(array, name, dimension, **kwargs)Create a new variable from a zarr array.
persist
(**_)Persist the variable data into memory.
rechunk
(**_)Rechunk the variable.
Protected Methods
Special Methods
__getitem__
(key)Get a slice of the variable.
Inherited Methods
Return an iterator over the variable dimensions and their index.
duplicate
(data)Create a new variable from the properties of this instance and the data provided.
fill_attrs
(var)Fill the variable attributes using the provided metadata.
have_same_properties
(other)Return true if this instance and the other variable have the same properties.
isel
(key)Return a new variable with data selected along the given dimension indices.
metadata
()Get the variable metadata.
rename
(name)Rename the variable.
Create a new variable without any attribute.
Convert the variable to an xarray.Variable.