
May 29, 2008
3:57 p.m.
This looks good:
import numpy as np x = np.random.rand(2,3) x.mean(None, out=x)
ValueError: wrong shape for output But this is strange:
x.std(None, out=x) 0.28264369725 x
array([[ 0.54718012, 0.94296181, 0.23668961], [ 0.35561918, 0.80860405, 0.96713833]])
x.var(None, out=x)
0.0798874595952
x
array([[ 0.54718012, 0.94296181, 0.23668961], [ 0.35561918, 0.80860405, 0.96713833]])
x.var(0, out=x)
array([ 0.0091739 , 0.004513 , 0.13338883])
x
array([[ 0.54718012, 0.94296181, 0.23668961], [ 0.35561918, 0.80860405, 0.96713833]]) I'm using numpy 1.0.4 from Debian Lenny.
6135
Age (days ago)
6135
Last active (days ago)
0 comments
1 participants
participants (1)
-
Keith Goodman