On Saturday, November 3, 2012 1:53:24 PM UTC, jason wrote: > sage: h = linear_transformation(RR^2, RR^2, matrix(RR, [[0, 1], [2, 3]])) > sage: h*3 #works fine >
This does not involve coercion. h.__mul__(3) figures out that 3 is scalar multiplication and handles it. sage: 3*h #doesn't work > This requires coercion, as 3.__mul__(h) can't possibly know about h being a vector space morphism. Hence you need the coercion infrastructure, and in particular _an_element_(). Just implement that. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to sage-devel@googlegroups.com. To unsubscribe from this group, send email to sage-devel+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en.