[Numpy-discussion] What's the difference between calling __mul__ and *?

Will Lee lee.will at gmail.com
Fri Jun 7 14:14:52 EDT 2013

I think I've figured this out.  It seems like the rule in the "Note" box is
the problem.  Since a matrix is not a subclass of my custom class, the
__rmul__ of the matrix is not being called.

Thanks for the info.


On Fri, Jun 7, 2013 at 11:40 AM, Alan G Isaac <alan.isaac at gmail.com> wrote:

> On 6/7/2013 12:30 PM, Will Lee wrote:
> > Can somebody tell me why these operations are not the same in numpy?
> http://docs.python.org/2/reference/datamodel.html#object.__rmul__
> hth,
> Alan Isaac
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130607/48777954/attachment.html>

More information about the NumPy-Discussion mailing list