Re: [Numpy-discussion] np.var() and ddof

2010-12-10 Thread Keith Goodman
On Fri, Dec 10, 2010 at 2:26 PM, wrote: > On Fri, Dec 10, 2010 at 4:42 PM, Keith Goodman wrote: >> Why does ddof=2 and ddof=3 give the same result? >> np.var([1, 2, 3], ddof=0) >>   0.3 np.var([1, 2, 3], ddof=1) >>   1.0 np.var([1, 2, 3], ddof=2) >>   2.0 np.v

Re: [Numpy-discussion] np.var() and ddof

2010-12-10 Thread josef . pktd
On Fri, Dec 10, 2010 at 4:42 PM, Keith Goodman wrote: > Why does ddof=2 and ddof=3 give the same result? > >>> np.var([1, 2, 3], ddof=0) >   0.3 >>> np.var([1, 2, 3], ddof=1) >   1.0 >>> np.var([1, 2, 3], ddof=2) >   2.0 >>> np.var([1, 2, 3], ddof=3) >   2.0 >>> np.var([1, 2, 3], d

[Numpy-discussion] np.var() and ddof

2010-12-10 Thread Keith Goodman
Why does ddof=2 and ddof=3 give the same result? >> np.var([1, 2, 3], ddof=0) 0.3 >> np.var([1, 2, 3], ddof=1) 1.0 >> np.var([1, 2, 3], ddof=2) 2.0 >> np.var([1, 2, 3], ddof=3) 2.0 >> np.var([1, 2, 3], ddof=4) -2.0 I expected NaN for ddof=3.