Attention
This repository has been archived. Please use xarray.DataTree instead.
datatree.DataTree.differentiate#
- DataTree.differentiate(coord: Hashable, edge_order: Literal[1, 2] = 1, datetime_unit: DatetimeUnitOptions | None = None) Self [source]#
Differentiate with the second order accurate central differences.
Note
This feature is limited to simple cartesian geometry, i.e. coord must be one dimensional.
- Parameters:
coord (
Hashable
) – The coordinate to be used to compute the gradient.edge_order (
{1, 2}
, default:1
) – N-th order accurate differences at the boundaries.datetime_unit (
None
or{"Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as", None}
, default:None
) – Unit to compute gradient. Only valid for datetime coordinate.
- Returns:
differentiated (
Dataset
)
See also
numpy.gradient
corresponding numpy function