Skip to content

Commit

Permalink
Merge pull request #44 from flatironinstitute/hotfix_docstrings
Browse files Browse the repository at this point in the history
added Raises to docstrings when empty samples or n_samples<=0 is passed
  • Loading branch information
BalzaniEdoardo authored Sep 14, 2023
2 parents f1194c3 + 19ca784 commit 4bb837c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/neurostatslib/basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def evaluate(self, *xi: ArrayLike) -> NDArray:
ValueError
- If the time point number is inconsistent between inputs.
- If the number of inputs doesn't match what the Basis object requires.
- At least one of the samples is empty.
"""
# check that the input is array-like
if any(
Expand Down Expand Up @@ -145,12 +146,12 @@ def evaluate_on_grid(self, *n_samples: int) -> Tuple[Tuple[NDArray], NDArray]:
The basis function evaluated at the samples,
shape (n_samples[0], ... , n_samples[n], number of basis).
Raises
------
ValueError
If the time point number is inconsistent between inputs or if the number of inputs doesn't match what
- If the time point number is inconsistent between inputs or if the number of inputs doesn't match what
the Basis object requires.
- If one of the n_samples is <= 0.
Notes
-----
Expand Down

0 comments on commit 4bb837c

Please sign in to comment.