2010/1/5 Håkan Granath <hakan.gran...@googlemail.com>: > Thanks a lot! > > It seems to boil down to that real(v14) is slow and shows the > Exception, whereas v14.real() is instant and gives no error. I would > have thought them to be equivalent.
I think it's always best to use the form a.real() (and similarly a.sqrt(), a.conjugate() etc) even if the functional version real(a), (etc) works since python has to do less work finding the appropriate function to apply. Looking at real?? I see that it does not appear to (as I would have expected) first try self.real() and then do something else if that fails. The docstring you see with real?? is th documentation for class Function_real_part(GinacFunction). Does anyone know why real(x) does not call x.real() when that exists? John > > /Håkan > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org