Skip to content

Commit

Permalink
Fix test so it works with pandas 2.0 (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
huard authored and Raphael Dussin committed Apr 24, 2023
1 parent ef65251 commit f8aa544
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xesmf/tests/test_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,9 @@ def test_compare_weights_from_poly_and_grid():
# plt.show()

# Check that source area affects weights
i = ds.indexes['lon'].get_loc(-55, method='nearest')
j1 = ds.indexes['lat'].get_loc(12, method='nearest')
j2 = ds.indexes['lat'].get_loc(72, method='nearest')
i = ds.indexes['lon'].get_indexer([-55], method='nearest')[0]
j1 = ds.indexes['lat'].get_indexer([12], method='nearest')[0]
j2 = ds.indexes['lat'].get_indexer([72], method='nearest')[0]
assert ds.wg.isel(lon=i, lat=j1) > ds.wg.isel(lon=i, lat=j2)
assert ds.wp.isel(lon=i, lat=j1).data > ds.wp.isel(lon=i, lat=j2).data # Fails

Expand Down

0 comments on commit f8aa544

Please sign in to comment.