[bugfix] avoid indexing an empty array when there are no NaNs at start of CF

This commit is contained in:
Darius Arnold authored and Marcel committed 2017-08-29 15:05:34 +02:00
1 parent bac6d6f5ec
commit 1ceb347602
1 file changed
+1
+1
View File
@@ -299,6 +299,7 @@ class HOScf(CharacteristicFunction):
# remove NaN's with first not-NaN-value, # remove NaN's with first not-NaN-value,
# so autopicker doesnt pick discontinuity at start of the trace # so autopicker doesnt pick discontinuity at start of the trace
ind = np.where(~np.isnan(LTA))[0] ind = np.where(~np.isnan(LTA))[0]
if ind.size:
first = ind[0] first = ind[0]
LTA[:first] = LTA[first] LTA[:first] = LTA[first]
self.cf = LTA self.cf = LTA