Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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; '21,': 0.07; 'function,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'separately': 0.09; 'subject:Why': 0.09; 'thereof.': 0.09; 'variance': 0.09; 'jan': 0.12; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'roy': 0.16; 'squared': 0.16; 'do,': 0.16; 'wrote:': 0.18; '(not': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'mon,': 0.24; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; 'am,': 0.29; "i'm": 0.30; 'probably': 0.32; 'something': 0.35; 'really': 0.36; 'doing': 0.36; 'subject:?': 0.36; 'generic': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'received:org': 0.40; 'how': 0.40; 'ensure': 0.60; 'even': 0.60; 'ian': 0.60; 'numbers': 0.61; 'received:173': 0.61; 'simple': 0.61; 'sum': 0.64; 'taking': 0.65; 'smith': 0.68; 'physical': 0.72; 'article': 0.77; 'distances': 0.84; 'received:fios.verizon.net': 0.84; 'average': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Why Python 3? Date: Sun, 20 Apr 2014 17:58:04 -0400 References: <7x8ur1esa5.fsf@ruckus.brouhaha.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-254-207.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1398031128 news.xs4all.nl 2971 [2001:888:2000:d::a6]:44773 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70433 On 4/20/2014 5:40 PM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly wrote: >>> When I'm writing a generic average function, I probably don't know whether >>> it will ever be used to average complex numbers. >> >> This keeps coming up in these discussions. How often do you really >> write a function that generic? And if you do, isn't it doing something >> so simple that it's then the caller's responsibility (not the >> function's, and not the language's) to ensure that it gets the right >> result? >> >> ChrisA > > Hmmm. Taking the average of a set of complex numbers has a reasonable > physical meaning. But, once you start down that path, I'm not sure how > far you can go before things no long make sense. What's the standard > deviation of a set of complex numbers? Does that even have any meaning? One can either calculate variance from the sum of squared distances from the mean point, or calculate x and y deviations separately and calculate the covariance matrix thereof. -- Terry Jan Reedy