Skip to content

Commit 033f56a

Browse files
committed
changed equal to allclose
1 parent 1486f6a commit 033f56a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_datasets.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ def test_trajectory():
331331
# dsactual.to_netcdf(expname)
332332
dsexpected = xr.open_dataset(expname)
333333
dsexpected = dsexpected.assign_coords({"s_rho": dsexpected["s_rho"]})[key_variable]
334-
assert dsexpected.equals(dsactual.astype(dsexpected.dtype))
334+
335+
# assert dsexpected.equals(dsactual.astype(dsexpected.dtype))
336+
assert np.allclose(dsexpected, dsactual, equal_nan=True)
335337

336338

337339
def test_trajectoryProfile():
@@ -396,7 +398,8 @@ def test_trajectoryProfile():
396398
# # previously saved with:
397399
# dsactual.to_netcdf(expname)
398400
dsexpected = xr.open_dataarray(expname)
399-
assert dsexpected.equals(dsactual.astype(dsexpected.dtype))
401+
# assert dsexpected.equals(dsactual.astype(dsexpected.dtype))
402+
assert np.allclose(dsexpected, dsactual, equal_nan=True)
400403

401404

402405
def test_grid():

0 commit comments

Comments
 (0)