# Top-level functions

## Computation

#### NOTE
For worked examples and advanced usage of `apply_ufunc`, see the
[User Guide on Computation](../user-guide/computation.html.md), and the
[apply_ufunc tutorial](https://tutorial.xarray.dev/advanced/apply_ufunc/apply_ufunc.html).

| [`apply_ufunc`](../generated/xarray.apply_ufunc.html.md#xarray.apply_ufunc)(func, \*args[, input_core_dims, ...])   | Apply a vectorized function for unlabeled arrays on xarray objects.                                                             |
|-------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| [`cov`](../generated/xarray.cov.html.md#xarray.cov)(da_a, da_b[, dim, ddof, weights])                       | Compute covariance between two DataArray objects along a shared dimension.                                                      |
| [`corr`](../generated/xarray.corr.html.md#xarray.corr)(da_a, da_b[, dim, weights])                           | Compute the Pearson correlation coefficient between two DataArray objects along a shared dimension.                             |
| [`cross`](../generated/xarray.cross.html.md#xarray.cross)(a, b, \*, dim)                                      | Compute the cross product of two (arrays of) vectors.                                                                           |
| [`dot`](../generated/xarray.dot.html.md#xarray.dot)(\*arrays[, dim])                                        | Generalized dot product for xarray objects.                                                                                     |
| [`map_blocks`](../generated/xarray.map_blocks.html.md#xarray.map_blocks)(func, obj[, args, kwargs, template])      | Apply a function to each block of a DataArray or Dataset.                                                                       |
| [`polyval`](../generated/xarray.polyval.html.md#xarray.polyval)(coord, coeffs[, degree_dim])                    | Evaluate a polynomial at specific values                                                                                        |
| [`unify_chunks`](../generated/xarray.unify_chunks.html.md#xarray.unify_chunks)(\*objects)                            | Given any number of Dataset and/or DataArray objects, returns new objects with unified chunk size along all chunked dimensions. |
| [`where`](../generated/xarray.where.html.md#xarray.where)(cond, x, y[, keep_attrs])                           | Return elements from x or y depending on cond.                                                                                  |

## Combining Data

| [`align`](../generated/xarray.align.html.md#xarray.align)(\*objects[, join, copy, indexes, ...])               | Given any number of Dataset and/or DataArray objects, returns new objects with aligned indexes and dimension sizes.                                  |
|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`broadcast`](../generated/xarray.broadcast.html.md#xarray.broadcast)(\*args[, exclude])                           | Explicitly broadcast any number of DataArray or Dataset objects against one another.                                                                 |
| [`concat`](../generated/xarray.concat.html.md#xarray.concat)(objs, dim[, data_vars, coords, ...])               | Concatenate xarray objects along a new or existing dimension.                                                                                        |
| [`merge`](../generated/xarray.merge.html.md#xarray.merge)(objects[, compat, join, fill_value, ...])            | Merge any number of xarray objects into a single Dataset as variables.                                                                               |
| [`combine_by_coords`](../generated/xarray.combine_by_coords.html.md#xarray.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`](../generated/xarray.combine_nested.html.md#xarray.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`](../generated/xarray.DataArray.html.md#xarray.DataArray)([data, coords, dims, name, attrs, ...])   | N-dimensional array with labeled coordinates and dimensions.                               |
|-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
| [`Dataset`](../generated/xarray.Dataset.html.md#xarray.Dataset)([data_vars, coords, attrs])                   | A multi-dimensional, in memory, array database.                                            |
| [`DataTree`](../generated/xarray.DataTree.html.md#xarray.DataTree)([dataset, children, name])                  | A tree-like hierarchical collection of xarray objects.                                     |
| [`full_like`](../generated/xarray.full_like.html.md#xarray.full_like)(other, fill_value[, dtype, ...])          | Return a new object with the same shape and type as a given object.                        |
| [`zeros_like`](../generated/xarray.zeros_like.html.md#xarray.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`](../generated/xarray.ones_like.html.md#xarray.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`](../generated/xarray.decode_cf.html.md#xarray.decode_cf)(obj[, concat_characters, ...])   | Decode the given Dataset or Datastore according to CF conventions into a new Dataset.   |
|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| [`infer_freq`](../generated/xarray.infer_freq.html.md#xarray.infer_freq)(index)                         | Infer the most likely frequency given the input index.                                  |
| [`show_versions`](../generated/xarray.show_versions.html.md#xarray.show_versions)([file])                  | print the versions of xarray and its dependencies                                       |
| [`set_options`](../generated/xarray.set_options.html.md#xarray.set_options)(\*\*kwargs)                  | Set options for xarray in a controlled context.                                         |
| [`get_options`](../generated/xarray.get_options.html.md#xarray.get_options)()                            | Get options for xarray.                                                                 |
