Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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; 'value,': 0.03; 'processed': 0.05; 'dict': 0.09; 'include.': 0.16; 'integers.': 0.16; 'numpy': 0.16; 'received:172.18.0': 0.16; 'values': 0.26; 'thanks!': 0.26; 'exclude': 0.29; 'array': 0.29; '8bit%:5': 0.29; 'returned': 0.30; 'header:Received:8': 0.30; 'running': 0.32; 'received:10.0': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'text': 0.34; 'list': 0.35; 'display': 0.36; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'relationship': 0.60; 'remove': 0.61; 'charset:windows-1256': 0.61; 'received:unknown': 0.63; 'subject:removal': 0.84; 'average': 0.93 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=YO+FcVZrxpdWV6Mo6AkY2Rtp7tuV51ZJEd1ZQZEmJbs= 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=RPkMIFjLxLU8XtljdBYA: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: Numpy outlier removal Thread-Topic: Numpy outlier removal Thread-Index: AQHN7EWmLivXMPS/qkW0/R0RnvrEGA== Date: Sun, 6 Jan 2013 19:44:08 +0000 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357501521 news.xs4all.nl 6952 [2001:888:2000:d::a6]:55043 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36279 I have a dataset that consists of a dict with text descriptions and values = that are integers. If=0A= required, I collect the values into a list and create a numpy array running= it through a simple=0A= routine:=A0data[abs(data - mean(data)) < m * std(data)] where m is the numb= er of std deviations=0A= to include.=0A= =0A= =0A= The problem is I loos track of which were removed so the original display o= f the dataset is=0A= misleading when the processed average is returned as it includes the remove= d key/values.=0A= =0A= =0A= Ayone know how I can maintain the relationship and when I exclude a value, = remove it from=0A= the dict?=0A= =0A= Thanks!=0A= jlc=