Skip to content

Commit

Permalink
Merge pull request #577 from GAA-UAM/fix/575-bsplinebasis-initializat…
Browse files Browse the repository at this point in the history
…ion-incorrect-error-message

BSplineBasis initialization incorrect error message
  • Loading branch information
vnmabus committed Oct 7, 2023
2 parents 3fb0ea9 + f441653 commit 93c4e0a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions skfda/representation/basis/_bspline_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,10 @@ def __init__( # noqa: WPS238
)
n_basis = len(knots) + order - 2

if (n_basis - order + 2) < 2:
if n_basis < order:
raise ValueError(
f"The number of basis ({n_basis}) minus the "
f"order of the bspline ({order}) should be "
f"greater than 3.",
f"The number of basis ({n_basis}) should not be smaller "
f"than the order of the bspline ({order}).",
)

self._order = order
Expand Down

0 comments on commit 93c4e0a

Please sign in to comment.