From 8631bc43c110747e0ccf01439a34a2ff63f8d004 Mon Sep 17 00:00:00 2001 From: "Adam J. Jackson" Date: Thu, 19 Sep 2024 15:56:44 +0100 Subject: [PATCH] Numpy style docstring --- euphonic/spectra.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/euphonic/spectra.py b/euphonic/spectra.py index 92ed84e7a..5ffa138a7 100644 --- a/euphonic/spectra.py +++ b/euphonic/spectra.py @@ -825,11 +825,15 @@ def _validate_item(self, item: Integral | slice | Sequence[Integral] | np.ndarra ) -> None: """Raise Error if index has inappropriate typing/ranges - Raises: - IndexError: Slice is not compatible with size of collection + Raises + ------ + IndexError + Slice is not compatible with size of collection + + TypeError + item specification does not have acceptable type; e.g. a sequence + of float or bool was provided when ints are needed. - TypeError: item specification does not have acceptable type; e.g. - a sequence of float or bool was provided when ints are needed. """ if isinstance(item, Integral): return