Hi,

I have a problem using numpy.dot, see below:

In [151]: m=5

In [152]: n=5

In [153]: x=(m*ones((1,5)))**arange(0,n)

In [154]: y=test.order_length[::-1]

In [155]: x
Out[155]: array([[   1.,    5.,   25.,  125.,  625.]])

In [156]: y
Out[156]:
array([[ 1024.],
       [ 1280.],
       [  640.],
       [  160.],
       [   20.]])

In [157]: numpy.dot(x,y)
Out[157]: array([[ 640000.]])

In [158]: sum(x*y.T)
Out[158]: 55924.0

Am I missing something?

Thanks,

Robin
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to