Hi,
I tried to post results but the file is too big, anyway, here is the
benchmark program if you want to run it:
Nicolas
-
import time
import numpy
from scipy import sparse
def benchmark(xtype = 'numpy.array', xdensity = 0.1,
ytype = 'numpy.array', ydensity = 1.0, n =
Hi,
I'm now testing dot product and using the following:
import numpy as np, scipy.sparse as sp
A = np.matrix(np.zeros((5,10)))
B = np.zeros((10,1))
print (A*B).shape
print np.dot(A,B).shape
A = sp.csr_matrix(np.zeros((5,10)))
B = sp.csr_matrix((10,1))
print (A*B).shape
print
I'd be interested to see the benchmark ;)
On Thu, May 28, 2009 at 4:14 PM, Nicolas Rougier
nicolas.roug...@loria.fr wrote:
Hi,
I'm now testing dot product and using the following:
import numpy as np, scipy.sparse as sp
A = np.matrix(np.zeros((5,10)))
B = np.zeros((10,1))
print
On Thu, May 28, 2009 at 10:14 AM, Nicolas Rougier
nicolas.roug...@loria.fr wrote:
Obviously, the last computation is not a dot product, but I got no
warning at all. Is that the expected behavior ?
Sparse matrices make no attempt to work with numpy functions like
dot(), so I'm not sure what is