コード例 #1
0
ファイル: test_ops.py プロジェクト: eotp/xray
 def test_wrong_shape(self):
     a = np.array([[1, np.nan, np.nan, 4]])
     b = np.array([[1, 2], [np.nan, 4]])
     assert not array_notnull_equiv(a, b)
コード例 #2
0
ファイル: test_ops.py プロジェクト: eotp/xray
 def test_equal(self, arr1, arr2):
     assert array_notnull_equiv(arr1, arr2)
コード例 #3
0
ファイル: test_ops.py プロジェクト: eotp/xray
 def test_some_not_equal(self):
     a = np.array([1, 2, 4])
     b = np.array([1, np.nan, 3])
     assert not array_notnull_equiv(a, b)
コード例 #4
0
ファイル: test_ops.py プロジェクト: eotp/xray
 def test_types(self, val1, val2, val3, null):
     arr1 = np.array([val1, null, val3, null])
     arr2 = np.array([val1, val2, null, null])
     assert array_notnull_equiv(arr1, arr2)
コード例 #5
0
ファイル: test_ops.py プロジェクト: fmaussion/xarray
 def test_wrong_shape(self):
     a = np.array([[1, np.nan, np.nan, 4]])
     b = np.array([[1, 2], [np.nan, 4]])
     assert not array_notnull_equiv(a, b)
コード例 #6
0
ファイル: test_ops.py プロジェクト: fmaussion/xarray
 def test_some_not_equal(self):
     a = np.array([1, 2, 4])
     b = np.array([1, np.nan, 3])
     assert not array_notnull_equiv(a, b)
コード例 #7
0
ファイル: test_ops.py プロジェクト: fmaussion/xarray
 def test_equal(self, arr1, arr2):
     assert array_notnull_equiv(arr1, arr2)
コード例 #8
0
ファイル: test_ops.py プロジェクト: fmaussion/xarray
 def test_types(self, val1, val2, val3, null):
     arr1 = np.array([val1, null, val3, null])
     arr2 = np.array([val1, val2, null, null])
     assert array_notnull_equiv(arr1, arr2)