Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'reason,': 0.07; 'subject:PEP': 0.07; 'accelerator': 0.09; 'arrays': 0.09; 'converts': 0.09; 'subject:module': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; '"we': 0.16; '(just': 0.16; '(unlike': 0.16; 'cc:name:python list': 0.16; 'collections': 0.16; 'compute': 0.16; 'datasets': 0.16; 'internally': 0.16; 'numpy': 0.16; 'path.': 0.16; 'stats': 0.16; 'subject:Adding': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'module': 0.19; 'numerical': 0.19; 'packages.': 0.19; 'work,': 0.20; 'cc:addr:python.org': 0.22; 'adds': 0.24; 'oriented': 0.24; 'guys': 0.24; 'cc:2**0': 0.24; 'compiled': 0.26; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'external': 0.29; 'array': 0.29; 'message- id:@mail.gmail.com': 0.30; 'along': 0.30; "i'm": 0.30; 'code': 0.31; 'argue': 0.31; 'object.': 0.31; 'lists': 0.32; 'skip:m 30': 0.32; 'guess': 0.33; "i'd": 0.34; 'common': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'accuracy': 0.36; 'doubt': 0.36; "didn't": 0.36; 'should': 0.36; 'performance': 0.37; 'problems': 0.38; 'depends': 0.38; 'e.g.': 0.38; 'machines': 0.38; 'needed': 0.38; 'rather': 0.38; 'that,': 0.38; 'expect': 0.39; 'sure': 0.39; 'either': 0.39; 'cost.': 0.60; 'august': 0.61; 'real': 0.63; 'education': 0.64; 'our': 0.64; 'great': 0.65; 'tasks.': 0.68; 'boost': 0.70; 'day': 0.76; 'clinical': 0.84; 'compiling': 0.84; 'gains': 0.84; 'nuclear': 0.84; 'oscar': 0.84; 'toy': 0.84; 'unacceptable': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=gqYOpe5+tZuAHaIuTvy6YqXYzMChS4LFG3R9xeLAvbU=; b=ohw6LtCToZP6WYNJnAH+0t3kOcnuWLIDlcZIVSbLTM25B/4eBXViy5IdK6meEdTTzI eCZLNqcFJucMYZj0Vypkk7UgAWjnRXgYDoBcAP/CV2Ciy/Yr2YtvwbgbtrLI7uMKRGN7 BluQqTZSMgrR2xuD8Do/dJraYhG+tm5j4qd0b9rDofSWsG0IUP+ybOm23DNmpc+vnVqE sF8tH69JB4hiBbOJ3bogyiIu36yBCaRYgQsBThKcCw8068EbvwLT29JHUe6BInWE16G5 PqY4ylw+zRd/P1dLjGQy6c6PRrGYBR4Vjwu9QMPXshrRaZlYyt+yIPpaEzoIKim3ipG7 C6/w== X-Received: by 10.52.165.111 with SMTP id yx15mr1478232vdb.33.1376682081627; Fri, 16 Aug 2013 12:41:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <55530414-1cf0-46fa-bdce-890d8679b292@googlegroups.com> References: <520592f9$0$30000$c3e8da3$5496439d@news.astraweb.com> <0d60fd90-eb19-4702-acd5-dd7ba0eddeda@googlegroups.com> <55530414-1cf0-46fa-bdce-890d8679b292@googlegroups.com> From: Oscar Benjamin Date: Fri, 16 Aug 2013 20:41:01 +0100 Subject: Re: PEP 450 Adding a statistics module to Python To: Chris Barker - NOAA Federal Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Python List 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: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376682090 news.xs4all.nl 15884 [2001:888:2000:d::a6]:58280 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52606 On 16 August 2013 20:00, wrote: > > > One other point -- for performance reason, is would be nice to have = some compiled code in there -- this adds incentive to put it in the stdlib = -- external packages that need compiling is what makes numpy unacceptable t= o some folks. >> >> It might be good to have a C accelerator one day but actually I think >> the pure-Python-ness of it is a strong reason to have it since it >> provides accurate statistics functions to all Python implementations >> (unlike numpy) at no additional cost. > > Well, I'd rather not have a package that is great for education and toy = problems, but not-so-good for the real ones... Again it depends what you mean by "real". From the other lists where we meet I'd guess that your problems are in the "needs a nuclear reactor" camp. I doubt that the stdlib will ever be sufficiently mathematically/computationally oriented to fully service either of our needs (and I don't mean that as a criticism). I persuaded the IT guys at my work that we needed the whole Enthought Python Distribution on all machines just because I didn't want to have to argue about individual packages. However in my real work, where I compute means and variances etc. I very often do work with very small datasets and I know a lot of others who work almost exclusively with them (think e.g. clinical data where N is often less than 100). > I guess my point is this: > > This is a way to make the standard python distribution better for some co= mmon computational tasks. But rather than think of it as "we need some stat= s functions in the python stdlib", perhaps we should be thinking: "out of t= he box python should be better for computation" -- in which case, I'd start= with a decent array object. I think that, whether or not the statistics module gains a C accelerator, if a fast numerical array type comes along then I'd expect that the statistics module would use its methods as a fast path. And if it provides a speed boost without compromising boundedness or accuracy I'm sure that the array type would be used internally where appropriate (just as numpy converts collections to arrays before computation). Oscar