Skip to content

Commit 130f951

Browse files
committed
Doc changes in whats-new.rst & cleaned up testing import permutation.
1 parent 0cc1b6a commit 130f951

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

doc/whats-new.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ v0.19.1 (unreleased)
2323
2424
New Features
2525
~~~~~~~~~~~~
26+
- Added an optional ``tolerance`` argument to :py:func:`isin` for numerically close datasets (:issue:`5587`, :pull:`5862`).
27+
By `Shane Hazelquist <https://github.com/shazelquist>`.
2628
- Added a :py:func:`get_options` method to xarray's root namespace (:issue:`5698`, :pull:`5716`)
2729
By `Pushkar Kopparla <https://github.com/pkopparla>`_.
2830
- Xarray now does a better job rendering variable names that are long LaTeX sequences when plotting (:issue:`5681`, :pull:`5682`).

xarray/tests/test_duck_array_ops.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88
from numpy import array, nan
99

10-
from xarray import DataArray, Dataset, cftime_range, concat
10+
from xarray import DataArray, Dataset, cftime_range, concat, testing
1111
from xarray.core import dtypes, duck_array_ops
1212
from xarray.core.duck_array_ops import (
1313
array_notnull_equiv,
@@ -902,7 +902,6 @@ def test_push_dask():
902902
def test_isin_tolerance(shape, tolerance, dask_for_A, dask_for_B):
903903
if (dask_for_A or dask_for_B) and not has_dask:
904904
pytest.skip("requires dask")
905-
from xarray.testing import assert_duckarray_equal
906905

907906
in_margin = tolerance / 2 # measure within acceptable margin
908907
arrayA = np.arange(-10.0, 10.0, 0.1).reshape(shape)
@@ -926,7 +925,7 @@ def test_isin_tolerance(shape, tolerance, dask_for_A, dask_for_B):
926925
# test function
927926
actual = isin_tolerance(arrayA, arrayB, tolerance)
928927

929-
assert_duckarray_equal(actual, expected)
928+
testing.assert_duckarray_equal(actual, expected)
930929
if dask_for_A:
931930
assert isinstance(actual, dask_array_type)
932931
else:
@@ -938,5 +937,5 @@ def test_isin_tolerance(shape, tolerance, dask_for_A, dask_for_B):
938937
# test function
939938
actual = isin_tolerance(arrayA, arrayB, tolerance)
940939

941-
assert_duckarray_equal(actual, expected)
940+
testing.assert_duckarray_equal(actual, expected)
942941
assert isinstance(actual, np.ndarray)

0 commit comments

Comments
 (0)