From 876a1f133049cc3643812fb0637396c65eebf193 Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Tue, 15 Jan 2019 10:58:49 +0200 Subject: [PATCH] Fix test failures with numpy=1.16 Fixes https://github.com/pydata/xarray/issues/2673 Note that these were only test failures, not a real bug. --- xarray/tests/test_variable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xarray/tests/test_variable.py b/xarray/tests/test_variable.py index 6dd50e11fd3..fdcc184eec4 100644 --- a/xarray/tests/test_variable.py +++ b/xarray/tests/test_variable.py @@ -140,8 +140,8 @@ def _assertIndexedLikeNDArray(self, variable, expected_value0, # check value is equal for both ndarray and Variable with warnings.catch_warnings(): warnings.filterwarnings('ignore', "In the future, 'NAT == x'") - assert variable.values[0] == expected_value0 - assert variable[0].values == expected_value0 + np.testing.assert_equal(variable.values[0], expected_value0) + np.testing.assert_equal(variable[0].values, expected_value0) # check type or dtype is consistent for both ndarray and Variable if expected_dtype is None: # check output type instead of array dtype