Hi,

> current behaviour. That is, what "A+B" on a blackboard in a math class
> means maps nicely to what 'a+b' means with a and b being numpy arrays. But
> 'A=B' means something completely different than 'a==b'.

This mapping is dangerous, I think A+B and A-B might be the only cases where 
it actually works. A*B and A/B (=A*inv(B)) are completely different from a*b 
in python. 

As it is, you only have to remember that every binary operator works 
element-wise.

Reasoning aside, just wrap an all(...) around your if-comparisons and you will 
be fine. :-)

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

Reply via email to