Skip to content

Commit

Permalink
Update basis_fd.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry57 authored Oct 27, 2024
1 parent 95716d8 commit 46c0f25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GENetLib/basis_fd.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def basis_fd(btype=None, rangeval=None, nbasis=None, params=None, dropind=None,
btype = "power"
else:
btype = "unknown"
if nbasis <= 0:
if nbasis is not None and nbasis<= 0:
raise ValueError("Argument nbasis is not positive.")
if round(nbasis) != nbasis:
if nbasis is not None and round(nbasis) != nbasis:
raise ValueError("Argument nbasis is not an integer.")
if quadvals is None:
quadvals = []
Expand Down Expand Up @@ -141,4 +141,4 @@ def basis_fd(btype=None, rangeval=None, nbasis=None, params=None, dropind=None,
}
return basisobj



0 comments on commit 46c0f25

Please sign in to comment.