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

Function _pl

mne/utils/misc.py:39–42  ·  view source on GitHub ↗

Determine if plural should be used.

(x, non_pl="", pl="s")

Source from the content-addressed store, hash-verified

37
38
39def _pl(x, non_pl="", pl="s"):
40 """Determine if plural should be used."""
41 len_x = x if isinstance(x, int | np.generic) else len(x)
42 return non_pl if len_x == 1 else pl
43
44
45def _explain_exception(start=-1, stop=None, prefix="> "):

Callers 15

pytest_terminal_summaryFunction · 0.90
test_documentedFunction · 0.90
dropMethod · 0.85
__repr__Method · 0.85
get_fitting_digFunction · 0.85
distance_to_bemFunction · 0.85
stc_near_sensorsFunction · 0.85

Calls

no outgoing calls

Tested by 5

pytest_terminal_summaryFunction · 0.72
test_documentedFunction · 0.72