Skip to content

Commit

Permalink
fix(profile): allow for computing all times with old method
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Siegel committed Aug 26, 2024
1 parent 376984c commit a02d1bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fitburst/routines/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def _identify_pbf_regime(arg: float, threshold=-20.0):
invalid = np.flatnonzero(~flag) if valid.size < flag.size else None

# If possible, convert from indices to slices so that a copy does not occur
if (valid[-1] + 1 - valid[0]) == valid.size:
if valid.size == 0:
valid = None
elif (valid[-1] + 1 - valid[0]) == valid.size:
valid = slice(valid[0], valid[-1]+1)

if invalid is not None and (invalid[-1] + 1 - invalid[0]) == invalid.size:
Expand Down

0 comments on commit a02d1bd

Please sign in to comment.