Skip to content

Commit

Permalink
cnmf/params.py: Improve zero check for decay time
Browse files Browse the repository at this point in the history
  • Loading branch information
pgunn committed Jan 31, 2024
1 parent 0d0ed6c commit cb0f53f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caiman/source_extraction/cnmf/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,8 @@ def __init__(self, fnames=None, dims=None, dxy=(1, 1),
Flag for reusing an already trained model (saved in path to model)
"""

if int(decay_time) == 0:
raise Exception("A decay time of 0 is not permitted")
if float(decay_time) == float(0.0):
raise Exception("A decay time of zero is not permitted")

self.data = {
'fnames': fnames,
Expand Down

0 comments on commit cb0f53f

Please sign in to comment.