On 27-Oct-08, at 7:22 AM, James Philbin wrote:

> One operator which could be used is '%'. We could keep the current
> behaviour for ARRAY%SCALAR but have ARRAY%ARRAY as being matrix
> multiplication. It has the same precedence as *,/.

The problem is that it would monkey with existing semantics for  
broadcasting, and break with all the other arithmetic operators in  
this regard. I can't see it ever being accepted for that reason.


Example:

In [514]: x
Out[514]:
array([[0, 1, 2],
        [3, 4, 5],
        [6, 7, 8]])

In [515]: y
Out[515]: array([0, 1, 2])

In [516]: x % y
Out[516]:
array([[0, 0, 0],
        [0, 0, 1],
        [0, 0, 0]])


David
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to