Ondrej Certik wrote:
> I just discovered we probably need to think about this:
> 
> In [1]: a = Matrix((1, x), (2, y))
> 
> In [2]: from numpy import array
> 
> In [3]: a
> Out[3]:
> ⎡1 x⎤
> ⎣2 y⎦
> 
> In [4]: Matrix(sin(array(a)))
> Out[4]:
> ⎡sin(1) sin(x)⎤
> ⎣sin(2) sin(y)⎦
> 
> In [5]: sin(a)
> [...]
> 
> AttributeError: 'Matrix' object has no attribute 'is_Number'
> 
> 
> What should [5] return? The same as [4] or the sin of a Matrix, which
> is defined as sin(A) = Q*sin(D)*Q^T    if A = Q*D*Q^T   and D is
> diagonal, so sin(D) is just the D with sin applied to the diagonal
> terms.

This stuff generates neverending discussions on numpy lists. Numpy 
currently solves this by having array (n-dimensional container) and 
matrix (special 2d array w.r.t. multiplication and some functions). As 
Matrix in SymPy is a linear algebra matrix, it should IMHO behave as 
such, i.e. sin(A) = Q*sin(D)*Q^T. Then maybe an Array would be usefull, 
something like sympy version of list of lists [of lists...].

r.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to