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) >>>> >>>> >array([ 0., 0., 0., 0., 0.]) > >Are method and function supposed to have different defaults? It looks >like the method defaults to variance over all axes while the function >defaults to axis=0. > > > They are supposed to have different defaults because the functional forms are largely for backward compatibility where axis=0 was the default.
-Travis ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion