Skip to content

Commit f35e1dd

Browse files
committed
Pyvista: use point_data instead of point_arrays (resolve warning from 0.32)
1 parent 5161e58 commit f35e1dd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/00_misc/04_herten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def generate_transmissivity():
7070

7171
print("Loading Herten data with pyvista")
7272
mesh = pv.read(VTK_PATH)
73-
herten = mesh.point_arrays["facies"].reshape(mesh.dimensions, order="F")
73+
herten = mesh.point_data["facies"].reshape(mesh.dimensions, order="F")
7474
# conductivity values per fazies from the supplementary data
7575
cond = 1e-4 * np.array(
7676
[2.5, 2.3, 0.61, 260, 1300, 950, 0.43, 0.006, 23, 1.4]

gstools/tools/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def to_vtk_structured(pos, fields): # pragma: no cover
8181
x, y, z, fields = _vtk_structured_helper(pos=pos, fields=fields)
8282
if pv is not None:
8383
grid = pv.RectilinearGrid(x, y, z)
84-
grid.point_arrays.update(fields)
84+
grid.point_data.update(fields)
8585
else:
8686
raise ImportError("Please install PyVista to create VTK datasets.")
8787
return grid
@@ -155,7 +155,7 @@ def to_vtk_unstructured(pos, fields): # pragma: no cover
155155
x, y, z, fields = _vtk_unstructured_helper(pos=pos, fields=fields)
156156
if pv is not None:
157157
grid = pv.PolyData(np.c_[x, y, z]).cast_to_unstructured_grid()
158-
grid.point_arrays.update(fields)
158+
grid.point_data.update(fields)
159159
else:
160160
raise ImportError("Please install PyVista to create VTK datasets.")
161161
return grid

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ doc =
7474
sphinx-rtd-theme>=1
7575
plotting =
7676
matplotlib>=3
77-
pyvista>=0.29
77+
pyvista>=0.32
7878
rust =
7979
gstools_core>=0.2.0,<1
8080
test =

0 commit comments

Comments
 (0)