Skip to content

Commit

Permalink
Do not access private _namedtuple member from pyvista (#1219)
Browse files Browse the repository at this point in the history
* Do not access `_namedtuple`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update core.py

* Update core.py

* Update core.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
user27182 and pre-commit-ci[bot] authored Nov 21, 2024
1 parent b1f9022 commit 43ba080
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/geovista/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import warnings

import lazy_loader as lazy
import pyvista as pv

from .common import (
CENTRAL_MERIDIAN,
Expand Down Expand Up @@ -375,7 +376,9 @@ def combine(
common_point_data = set(first.point_data.keys())
common_cell_data = set(first.cell_data.keys())
common_field_data = set(first.field_data.keys())
active_scalars_info = {first.active_scalars_info._namedtuple} # noqa: SLF001
active_scalars_info = {
pv.core.dataset.ActiveArrayInfoTuple(*first.active_scalars_info)
}

for i, mesh in enumerate(meshes):
if not isinstance(mesh, pv.PolyData):
Expand Down Expand Up @@ -425,7 +428,9 @@ def combine(
common_cell_data &= set(mesh.cell_data.keys())
common_field_data &= set(mesh.field_data.keys())
if mesh.active_scalars_name:
active_scalars_info &= {mesh.active_scalars_info._namedtuple} # noqa: SLF001
active_scalars_info &= {
pv.core.dataset.ActiveArrayInfoTuple(*mesh.active_scalars_info)
}

points = np.vstack(combined_points)
faces = np.hstack(combined_faces)
Expand Down

0 comments on commit 43ba080

Please sign in to comment.