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

This commit is contained in:
Darius Arnold 2017-08-26 17:26:35 +02:00 committed by Marcel
parent bac6d6f5ec
commit 1ceb347602

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