Skip to content

Commit

Permalink
Change to fix potential indexing error
Browse files Browse the repository at this point in the history
  • Loading branch information
Kessler authored and Kessler committed Mar 25, 2019
1 parent a3ce5ad commit b454fd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ecnet/tasks/remove_outliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def remove_outliers(df, leaf_size=40, num_processes=1):
n_jobs=num_processes
)
logger.log('debug', 'Outliers: {}'.format(outliers), call_loc='OUTLIERS')
for idx, pt in enumerate(df.data_points):
for out in outliers:
if pt.id == out:
for out in outliers:
for idx, pt in enumerate(df.data_points):
if out == pt.id:
del df.data_points[idx]
break
return df

0 comments on commit b454fd3

Please sign in to comment.