Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.045 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'see.': 0.07; 'dict': 0.09; 'keyed': 0.09; 'rebuild': 0.09; 'comp': 0.16; 'comparison.': 0.16; 'received:172.18.0': 0.16; '\xa0if': 0.22; 'header:In-Reply-To:1': 0.25; 'common': 0.26; 'thanks!': 0.26; 'received:24': 0.27; 'dictionary': 0.29; 'header:Received:8': 0.30; 'received:10.0': 0.33; 'to:addr:python-list': 0.33; 'sometimes': 0.35; 'too': 0.36; 'data': 0.37; 'subject:: ': 0.38; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'your': 0.60; 'charset:windows-1256': 0.61; 'received:unknown': 0.63; 'results': 0.65; 'obvious': 0.71; 'subject:removal': 0.84 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=qT60hWcJq2tKMlwzTlfV91MSQCJjCwg5oP07qu3o0oU= c=1 sm=1 a=CRTDazI5n6YA:10 a=7PYXob_7ZXMA:10 a=BLceEmwcHowA:10 a=eoNxP8pz9j0A:10 a=xqWC_Br6kY4A:10 a=oNw28mxuUhXRB3mVwYQ4Ag==:17 a=OUbNcuM1NwLDsTb6KpoA:9 a=RFXaeJp-pwgA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 From: "Joseph L. Casale" To: =?windows-1256?Q?Python_=FD=5Bpython-list=40python=2Eorg=5D=FD?= Subject: RE: Numpy outlier removal Thread-Topic: Numpy outlier removal Thread-Index: AQHN7F3oLivXMPS/qkW0/R0RnvrEGJg85zXY Date: Sun, 6 Jan 2013 22:50:07 +0000 References: , <50e9fbd5$0$6848$e4fe514c@news2.news.xs4all.nl> In-Reply-To: <50e9fbd5$0$6848$e4fe514c@news2.news.xs4all.nl> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.18.0.200] Content-Type: text/plain; charset="windows-1256" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357512697 news.xs4all.nl 6857 [2001:888:2000:d::a6]:50350 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36300 >Assuming your data and the dictionary are keyed by a common set of keys:= =A0=0A= =0A= >=0A= >for key in descriptions:=0A= > =A0 =A0if abs(data[key] - mean(data)) >=3D m * std(data):=0A= > =A0 =A0 =A0 =A0del data[key]=0A= > =A0 =A0 =A0 =A0del descriptions[key]=0A= =0A= =0A= Heh, yeah sometimes the obvious is too simple to see. I used a dict comp to= rebuild=0A= the results with the comparison.=0A= =0A= =0A= Thanks!=0A= jlc=