I'd like to add an exponential function to RDF/CDF matrices (and enhance the existing exp function for SR matrices) so that:
sage: A = matrix(SR, [[1,2],[3,4]]) sage: e^A gives the same as sage: A.exp() (I'd also like this to work for other matrices, like over RDF or CDF, where the returned matrix would be another RDF/CDF matrix---scipy has functions that do this). However, currently for constants (in sage/functions/constants.py), the __pow__ function automatically converts the exponent to an SR object, which fails for a matrix. I have not worked with the constants code before. Would there be a problem with, for the E constant, overriding __pow__ so that if the object had an "_exp" method, that was called instead of the default conversion to SR objects? Would that be the proper way to get the above functionality? The goal is also to get exp(A) to work as well; would I get that for free? Thanks, Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---