diff --git a/GENetLib/basis_fd.py b/GENetLib/basis_fd.py index 74a0604..501a972 100644 --- a/GENetLib/basis_fd.py +++ b/GENetLib/basis_fd.py @@ -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 = [] @@ -141,4 +141,4 @@ def basis_fd(btype=None, rangeval=None, nbasis=None, params=None, dropind=None, } return basisobj - \ No newline at end of file +