Discussion: new operators for numerical computation
John Lull
lull at acm.org
Thu Jul 20 22:26:03 EDT 2000
"Pete Shinners" <pete at visionart.com> wrote (with possible deletions):
> but while we're at it, i would hope that we don't overlook the
> potential of elementwise assignment operators. sometimes those
> matrices can get rather large, and rather than create a new
> temporary matrix for every operation, it would be nice to have
> it done "in place"
>
> MatrixA (*)= MatrixB
> MatrixA (.)= MatrixB
For all the other augmented assignment operators,
A op= B
is precisely equivalent to
A = A op B
If * is elementwise multiplication then *= should naturally be the
corresponsing elementwise operator, and
A (*)= B
should be precisely equivalent to
A = A (*) B
Anything else means these operators are different from standard
operators -- and that leads to confusion.
Regards,
John
More information about the Python-list
mailing list