Top-level functions#
Computation#
Note
For worked examples and advanced usage of apply_ufunc, see the
User Guide on Computation, and the
apply_ufunc tutorial.
apply_ufunc(func, *args[, input_core_dims, ...])
Apply a vectorized function for unlabeled arrays on xarray objects.
cov(da_a, da_b[, dim, ddof, weights])
Compute covariance between two DataArray objects along a shared dimension.
corr(da_a, da_b[, dim, weights])
Compute the Pearson correlation coefficient between two DataArray objects along a shared dimension.
cross(a, b, *, dim)
Compute the cross product of two (arrays of) vectors.
dot(*arrays[, dim])
Generalized dot product for xarray objects.
map_blocks(func, obj[, args, kwargs, template])
Apply a function to each block of a DataArray or Dataset.
polyval(coord, coeffs[, degree_dim])
Evaluate a polynomial at specific values
unify_chunks(*objects)
Given any number of Dataset and/or DataArray objects, returns new objects with unified chunk size along all chunked dimensions.
where(cond, x, y[, keep_attrs])
Return elements from x or y depending on cond.
Combining Data#
align(*objects[, join, copy, indexes, ...])
Given any number of Dataset and/or DataArray objects, returns new objects with aligned indexes and dimension sizes.
broadcast(*args[, exclude])
Explicitly broadcast any number of DataArray or Dataset objects against one another.
concat(objs, dim[, data_vars, coords, ...])
Concatenate xarray objects along a new or existing dimension.
merge(objects[, compat, join, fill_value, ...])
Merge any number of xarray objects into a single Dataset as variables.
combine_by_coords([data_objects, compat, ...])
Attempt to auto-magically combine the given datasets (or data arrays) into one by using dimension coordinates.
combine_nested(datasets, concat_dim[, ...])
Explicitly combine an N-dimensional grid of datasets into one by using a succession of concat and merge operations along each dimension of the grid.
Creation#
DataArray([data, coords, dims, name, attrs, ...])
N-dimensional array with labeled coordinates and dimensions.
Dataset([data_vars, coords, attrs])
A multi-dimensional, in memory, array database.
DataTree([dataset, children, name])
A tree-like hierarchical collection of xarray objects.
full_like(other, fill_value[, dtype, ...])
Return a new object with the same shape and type as a given object.
zeros_like(other[, dtype, chunks, ...])
Return a new object of zeros with the same shape and type as a given dataarray or dataset.
ones_like(other[, dtype, chunks, ...])
Return a new object of ones with the same shape and type as a given dataarray or dataset.
Miscellaneous#
decode_cf(obj[, concat_characters, ...])
Decode the given Dataset or Datastore according to CF conventions into a new Dataset.
infer_freq(index)
Infer the most likely frequency given the input index.
show_versions([file])
print the versions of xarray and its dependencies
set_options(**kwargs)
Set options for xarray in a controlled context.
Get options for xarray.