Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Matrix operations on character matrix element? (http://www.velocityreviews.com/forums/t678226-re-matrix-operations-on-character-matrix-element.html)

 Terry Reedy 04-02-2009 12:12 AM

Re: Matrix operations on character matrix element?

olusina eric wrote:
> I hope somebody will be able to help me here.
> I am trying to solve some physical problems that will require the
> generation of some function in terms of some parameters. These functions
> are derived from matrix operation on “characters”. Are there ways
> numpy/scipy perform matrix operations on characters?
>
> For example A = matrix([[a, b,c],[d,e,f],[1,2,3]])
>
> B = matrix([[g,h,4],[I,j,5],[k,l,6]])

A to l are identifiers, not characters, and must be bound to objects for
the above to make any sense. Did you mean 'a' to 'l'?

> Is it possible to perform operations like A*B or A+B
>
> And most especially: linalg.solve(A,eye(3,3))

If you mean, operate on symbols to do symbolic computation, the same way
one might with paper and pencil, the simple answer is no. Numpy is not
a computer algebra system.

Computer algebra requires that one define classes such as Symbol, with
all the usual arithmetic operations. I am not sure whether numpy
algorithms can work on arrays of instances of user-defined classes such
as this.

tjr

 All times are GMT. The time now is 02:57 PM.