[Numpy-discussion] Re: Numpy-discussion digest, Vol 1 #366 - 7 msgs
Greg Kochanski
gpk at bell-labs.com
Tue Dec 11 12:54:03 EST 2001
Spacesaver doesn't propagate through matrix multiplies:
>>> import Numeric
>>> x=Numeric.zeros((3,3), Numeric.Float32)
>>> x.savespace(1)
>>> x
array([[ 0., 0., 0.],
[ 0., 0., 0.],
[ 0., 0., 0.]],'f')
>>> x.spacesaver()
1
>>> y = Numeric.matrixmultiply(x, x)
>>> y
array([[ 0., 0., 0.],
[ 0., 0., 0.],
[ 0., 0., 0.]],'f')
>>> y.spacesaver()
0
More information about the NumPy-Discussion
mailing list