Skip to content

Commit

Permalink
Numpy style docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjackson committed Sep 19, 2024
1 parent 3ecad2c commit 8631bc4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions euphonic/spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8631bc4

Please sign in to comment.