Yes and no and no.
Numpy/scipy matrices have their backend in C/fortran types. Arbitrary objects 
can't be put inside them. 

That's where sympy comes in and finds a market for its use. I'm adding a 
dtype(the usgae of this name might be wrong) argument to sympy matrices. 6 
basic types, ints, rationals, reals, polys, rational functions, and finally 
Exprs will be built in. It will have an 'other' option which will the user to 
put in any arbitrary type as elements of the matrix which support the 
fundamental operations required for matrix algorithms. 

Possibly, a template could be provided to the user to have provide the sympy 
matrix with domain.sum, domain.typify, etc..

Still, 90% of symbolic matrix needs would be covered by the 6 builtins. 
Sent on my BlackBerry® from Vodafone

-----Original Message-----
From: Brian Granger <elliso...@gmail.com>
Sender: sympy@googlegroups.com
Date: Thu, 2 Jun 2011 08:56:29 
To: <sympy@googlegroups.com>
Reply-To: sympy@googlegroups.com
Subject: Re: [sympy] Re: A simple idea regarding groundtypes for Matrix

I am a bit confused here as well.

Are you considering adding a dtype argument to sympy.Matrix?
Are you consider making sympy.Expr objects work inside numpy matrices?
Are you considering making sympy.Expr work inside scipy.sparse matrices?

Cheers,

Brian

On Wed, Jun 1, 2011 at 9:27 PM, SherjilOzair <sherjiloz...@gmail.com> wrote:
> scipy.sparse implements a dtype kwarg argument, but which currently
> cannot take in arbitrary unknown types though.
> One thing that can be done about this, is to define an interface for
> the dtype. It would be taken for granted that it will have +, *, /
> defined. Checks will be used in algorithms if it has pow, inverse
> defined or not.
> The caller will be provided with a dtype function argument in the
> Matrix constructor.
>
> I list some built-in dtypes that sympy has and can provide. With only
> these 6 dtypes, Matrix should suffice for 90% of symbolic matrix
> needs. Possibly, if the caller doesn't want any of these dtypes, then
> he should specify 'other' in the dtype argument.
>
> Int, numeric, can employ addition, multiplication, raising to positive
> integral power.
> Rational, numeric, can employ addition, multiplication, division,
> inverse, raising to integral power.
> Real, numeric, can employ addition, multiplication, division, inverse,
> raising to any power.
> Poly (Or one of its internals), symbolic, to support addition,
> multiplication, division by scalar, *not* inverse, raising to positive
> integral power.
> Rational Function, symbolic, to support addition, multiplication,
> division by scalar, inverse, raising to integral power.
> Expr, symbolic, to support addition, multiplication, division by
> scalar, inverse, raising to all powers.
>
> --
> 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 
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgran...@calpoly.edu and elliso...@gmail.com

-- 
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 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

-- 
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 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to