[SciPy-User] Again with matrices multiplication

Graziano Mirata graziano.mirata@lu.unisi...
Fri Mar 26 06:10:32 CDT 2010


Hi guys, 
it's me again. Still problems with matrices multiplication. 

So i have used dot(w,R) to multiply two arrays but now i cannot access to elements. I.e 

In [224]: w.shape
Out[224]: (3,)
In [226]: R.shape
Out[226]: (24000, 3)

In [227]: r = dot(R,w)

In [228]: type(r)
Out[228]: <type 'numpy.ndarray'>

In [229]: r.shape
Out[229]: (24000,)

In [230]: r[0,0]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)

/<ipython console> in <module>()

IndexError: invalid index

In [231]: r[:,0]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)

/<ipython console> in <module>()

IndexError: invalid index

Thanx

G




More information about the SciPy-User mailing list