MCPcopy Create free account
hub / github.com/danjgale/surfplot / _check_surf

Function _check_surf

surfplot/plotting.py:16–24  ·  view source on GitHub ↗

Validate surface type and load if a file name

(surf)

Source from the content-addressed store, hash-verified

14from .surf import plot_surf
15
16def _check_surf(surf):
17 """Validate surface type and load if a file name"""
18 if isinstance(surf, (str, pathlib.Path)):
19 return read_surface(str(surf))
20 elif isinstance(surf, BSPolyData) or (surf is None):
21 return surf
22 else:
23 raise ValueError('Surface be a path-like string, an instance of '
24 'BSPolyData, or None')
25
26
27def _set_layout(lh, rh, layout, views, mirror=False):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected