On Sun, Jun 8, 2008 at 3:54 AM, Anne Archibald <[EMAIL PROTECTED]> wrote: > 2008/6/7 Robert Kern <[EMAIL PROTECTED]>: >> On Sat, Jun 7, 2008 at 14:37, Ondrej Certik <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> what is the current plan with array and matrix with regard of calculating >>> >>> sin(A) >>> >>> ? I.e. elementwise vs sin(A) = Q*sin(D)*Q^T? Is the current approach >>> (elementwise for array and Q*sin(D)*Q^T for matrix) the way to go? >> >> I don't believe we intend to make numpy.matrix any more featureful. I >> don't think it's a good idea for you to base sympy.Matrix's >> capabilities in lock-step with numpy.matrix, though. There are very >> different constraints at work. Please, do what you think is best for >> sympy.Matrix. > > Let me elaborate somewhat: > > We recently ran across some painful quirks in numpy's handling of > matrices, and they spawned massive discussion. As it stands now, there > is significant interest in reimplementing the matrix object from > scratch, with different behaviour. So emulating its current behaviour > is not a win. > > For consistency, it makes a certain amount of sense to have sin(A) > compute a matrix sine, since A**n computes a matrix power. But looking > at the matrix exponential, I see that we have several implementations, > none of which is satisfactory for all matrices. I would expect the > matrix sine to be similar - particularly when faced with complex > matrices - so perhaps needing an explicit matrix sine is a good thing? > > Also worth noting is that this problem can be evaded with namespaces; > matrix sin could be scipy.matrixmath.sin, abbreviated perhaps to > mm.sin, as opposed to np.sin.
I see. Thanks Robert and Anne for the replies. That's all I needed to know. Ondrej _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion