Skip to content

Commit 8281902

Browse files
committed
Fix test failures with numpy=1.16 (#2675)
Fixes #2673 Note that these were only test failures, not a real bug.
1 parent 70c4b9e commit 8281902

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xarray/tests/test_variable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ def _assertIndexedLikeNDArray(self, variable, expected_value0,
140140
# check value is equal for both ndarray and Variable
141141
with warnings.catch_warnings():
142142
warnings.filterwarnings('ignore', "In the future, 'NAT == x'")
143-
assert variable.values[0] == expected_value0
144-
assert variable[0].values == expected_value0
143+
np.testing.assert_equal(variable.values[0], expected_value0)
144+
np.testing.assert_equal(variable[0].values, expected_value0)
145145
# check type or dtype is consistent for both ndarray and Variable
146146
if expected_dtype is None:
147147
# check output type instead of array dtype

0 commit comments

Comments
 (0)