MCPcopy
hub / github.com/mne-tools/mne-python / _path_like

Function _path_like

mne/utils/check.py:682–699  ·  view source on GitHub ↗

Validate that `item` is `path-like`. Parameters ---------- item : object The thing to be checked. Returns ------- bool ``True`` if `item` is a `path-like` object; ``False`` otherwise.

(item)

Source from the content-addressed store, hash-verified

680
681
682def _path_like(item):
683 """Validate that `item` is `path-like`.
684
685 Parameters
686 ----------
687 item : object
688 The thing to be checked.
689
690 Returns
691 -------
692 bool
693 ``True`` if `item` is a `path-like` object; ``False`` otherwise.
694 """
695 try:
696 _validate_type(item, types="path-like")
697 return True
698 except TypeError:
699 return False
700
701
702def _check_if_nan(data, msg=" to be plotted"):

Callers 10

test_path_likeFunction · 0.90
__init__Method · 0.85
_get_transFunction · 0.85
_write_echosFunction · 0.85
make_flash_bemFunction · 0.85
_volume_labelsFunction · 0.85
_ensure_srcFunction · 0.85
_add_icaMethod · 0.85
add_figureMethod · 0.85
add_annotationMethod · 0.85

Calls 1

_validate_typeFunction · 0.85

Tested by 1

test_path_likeFunction · 0.72