xarray.testing.assert_equal#
- xarray.testing.assert_equal(a, b)[source]#
Like
numpy.testing.assert_array_equal()
, but for xarray objects.Raises an AssertionError if two objects are not equal. This will match data values, dimensions and coordinates, but not names or attributes (except for Dataset objects for which the variable names must match). Arrays with NaN in the same location are considered equal.
- Parameters:
a (
xarray.Dataset
,xarray.DataArray
orxarray.Variable
) – The first object to compare.b (
xarray.Dataset
,xarray.DataArray
orxarray.Variable
) – The second object to compare.
See also
assert_identical
,assert_allclose
,Dataset.equals
,DataArray.equals
,numpy.testing.assert_array_equal