[bugfix] avoid indexing an empty array when there are no NaNs at start of CF
This commit is contained in:
		
							parent
							
								
									bac6d6f5ec
								
							
						
					
					
						commit
						1ceb347602
					
				| @ -299,8 +299,9 @@ 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] | ||||||
|         first = ind[0] |         if ind.size: | ||||||
|         LTA[:first] = LTA[first] |             first = ind[0] | ||||||
|  |             LTA[:first] = LTA[first] | ||||||
|         self.cf = LTA |         self.cf = LTA | ||||||
|         self.xcf = x |         self.xcf = x | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user