Determine if plural should be used.
(x, non_pl="", pl="s")
| 37 | |
| 38 | |
| 39 | def _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 | |
| 45 | def _explain_exception(start=-1, stop=None, prefix="> "): |
no outgoing calls