Skip to content

Commit

Permalink
Fix visualization test using deprecated PyVista method (#433)
Browse files Browse the repository at this point in the history
Replace the deprecated `pv_grid.cell_bounds()` for an iterator over the
cells (`pv_grid.cell`) and then use `Cell.bounds` to get the bounds of
each cell.
  • Loading branch information
santisoler authored Sep 7, 2023
1 parent 166372c commit 001be9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions harmonica/tests/test_visualizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def test_prism_to_pyvista(prisms, density):
assert pv_grid.n_cells == 4
assert pv_grid.n_points == 32
# Check coordinates of prisms
for i, prism in enumerate(prisms):
npt.assert_allclose(prism, pv_grid.cell_bounds(i))
for prism, cell in zip(prisms, pv_grid.cell):
npt.assert_allclose(prism, cell.bounds)
# Check properties of the prisms
assert pv_grid.n_arrays == 1
assert pv_grid.array_names == ["density"]
Expand Down

0 comments on commit 001be9a

Please sign in to comment.