problem in using linalg solver in numpy

MRAB python at mrabarnett.plus.com
Sat Aug 14 21:06:25 CEST 2010


Pramod wrote:
> Hi Friends
> 
> 
> When run the below  program in python i got error like this ,
> 
> 
> Matrix
> [[ 8 -6  2]
>  [-4 11 -7]
>  [ 4 -7  6]]
> row vecotr X
> [[ 28 -40  33]]
> Traceback (most recent call last):
>   File "solve.py", line 16, in <module>
>     print A*B
>   File "/usr/lib/python2.6/dist-packages/numpy/core/defmatrix.py",
> line 290, in __mul__
>     return N.dot(self, asmatrix(other))
> ValueError: objects are not aligned
> 
[snip]
If you're trying to multiply element-wise use the 'multiply' function.



More information about the Python-list mailing list