Skip to content

Commit 3048969

Browse files
committed
Only compute _isurf when needed in _surf_diag
1 parent 5584098 commit 3048969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stagpy/plates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ def _surf_diag(snap, name):
130130
Can be a sfield, a regular scalar field evaluated at the surface,
131131
or dv2 (which is dvphi/dphi).
132132
"""
133-
isurf = _isurf(snap)
134133
with suppress(error.UnknownVarError):
135134
return snap.sfields[name]
135+
isurf = _isurf(snap)
136136
with suppress(error.UnknownVarError):
137137
field, meta = snap.fields[name]
138138
return Field(field[0, :, isurf, 0], meta)

0 commit comments

Comments
 (0)