Numpy outlier removal

Joseph L. Casale jcasale at
Sun Jan 6 23:50:07 CET 2013

>Assuming your data and the dictionary are keyed by a common set of keys: 

>for key in descriptions:
>    if abs(data[key] - mean(data)) >= m * std(data):
>        del data[key]
>        del descriptions[key]

Heh, yeah sometimes the obvious is too simple to see. I used a dict comp to rebuild
the results with the comparison.


More information about the Python-list mailing list