Props to numpy programmers!

Andrew Felch andrewfelch at yahoo.com
Wed Nov 19 20:28:25 EST 2003


So I wanted to matrixmultiply

[[a,b],
 [c,d]] 

*

[e,f]

Of course this is impossible, because the number of columns in the
first factor is not equal to the number of rows in the second.  Wrong!
 It is impossible because the second matrix is rank1!  So numpy
happily converts it to a column vector so the multiplication will
work, and converts the answer back into a rank1 vector!!!!

I love NUMPY!!!!!!!!!!!

I was reading my code and thought I had a bug, I couldn't figure out
why the code was still working right!  It's because the numpy people
are geniouses!

Hooray numpy!!!!!!!!!!  Numpy is smarter than  me!




More information about the Python-list mailing list