Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Raises to docstrings when empty samples or n_samples<=0 is passed #44

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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