Re: [Numpy-discussion] unexpected behaviour of numpy.var

2006-08-01 Thread Torgil Svensson
> They are supposed to have different defaults because the functional > forms are largely for backward compatibility where axis=0 was the default. > > -Travis Isn't backwards compatibility what "oldnumeric" is for? +1 for consistent defaults. -

Re: [Numpy-discussion] unexpected behaviour of numpy.var

2006-08-01 Thread Travis Oliphant
Sasha wrote: >I cannot reproduce your results, but I wonder if the following is right: > > > a = array([1,2,3,4,5]) var(a[newaxis,:]) >array([ 0., 0., 0., 0., 0.]) > > a[newaxis,:].var() >2.0 > > a[newaxis,:].var(axis=0) >>

Re: [Numpy-discussion] unexpected behaviour of numpy.var

2006-08-01 Thread David Grant
I also couldn't reproduce it on my 0.9.8 on Linux.DGOn 8/1/06, David L Goldsmith <[EMAIL PROTECTED] > wrote:Hi, Hanno.  I ran your sample session in numpy 0.9.8 (on a Mac, just so you know; I don't yet have numpy installed on my Windows platform, and Idon't have immediate access to a *nix box) and

Re: [Numpy-discussion] unexpected behaviour of numpy.var

2006-08-01 Thread Sasha
I cannot reproduce your results, but I wonder if the following is right: >>> a = array([1,2,3,4,5]) >>> var(a[newaxis,:]) array([ 0., 0., 0., 0., 0.]) >>> a[newaxis,:].var() 2.0 >>> a[newaxis,:].var(axis=0) array([ 0., 0., 0., 0., 0.]) Are method and function supposed to have different de

Re: [Numpy-discussion] unexpected behaviour of numpy.var

2006-08-01 Thread David L Goldsmith
Hi, Hanno. I ran your sample session in numpy 0.9.8 (on a Mac, just so you know; I don't yet have numpy installed on my Windows platform, and I don't have immediate access to a *nix box) and could not reproduce the problem, i.e., it does appear to have been fixed in 0.9.8. DG Hanno Klemm wrot