Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit c3030fe

Browse files
committed
Fatigue: small fix for constant channels
1 parent e4f431f commit c3030fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyFAST/tools/fatigue.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def find_range_count(signal, bins, method='rainflow_windap', meanBin=True, binSt
131131
ranges = fatpack.find_rainflow_ranges(signal)
132132
except IndexError:
133133
# Currently fails for constant signal
134-
return np.nan
134+
return np.nan, np.nan, np.nan
135135
# --- Legacy fatpack
136136
# if (not binStartAt0) and (not meanBin):
137137
# N, S = fatpack.find_range_count(ranges, bins)
@@ -148,6 +148,7 @@ def find_range_count(signal, bins, method='rainflow_windap', meanBin=True, binSt
148148
b = np.isnan(S)
149149
S[b] = 0
150150
N[b] = 0
151+
151152
return N, S, S_bin_edges
152153

153154
def create_bins(x, bins, binStartAt0=False):

0 commit comments

Comments
 (0)