Skip to content

Commit 7b05e3b

Browse files
committed
FIX: Better
1 parent b6b4c25 commit 7b05e3b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

mne/surface.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -803,14 +803,15 @@ def query(self, rr):
803803

804804
def _call_pyvista(self, rr):
805805
pdata = _surface_to_polydata(dict(rr=rr))
806-
# PyVista 0.47+
807-
meth = (
808-
pdata.select_interior_points
809-
if hasattr(pdata, "select_interior_points")
810-
else pdata.select_enclosed_points
811-
)
806+
# TODO VERSION PyVista 0.47+
807+
if hasattr(pdata, "select_interior_points"):
808+
meth = pdata.select_interior_points
809+
key = "selected_points"
810+
else:
811+
meth = pdata.select_enclosed_points
812+
key = "SelectedPoints"
812813
out = meth(self.pdata, check_surface=False)
813-
return out["SelectedPoints"].astype(bool)
814+
return out[key].astype(bool)
814815

815816
def _call_old(self, rr, n_jobs):
816817
n_orig = len(rr)

0 commit comments

Comments
 (0)