Regarding the base field, this is something that needs to be fixed in
the SymPy matrices in general. For starters, I would just assume that
the span is complex. Once we have strong domain support in the
matrices, we can expand this.

Regarding how to implement it, I think it would be best to implement
it in the matrix expressions module. That way, you could represent the
span of a list of symbolic vectors, or even the span of the columns of
a symbolic matrix (which might have a symbolic size).

Matthew Rocklin (the author of most of the matrix expression module)
could also probably give you some more guidance here.

Aaron Meurer

On Fri, Mar 8, 2013 at 2:58 AM, Ben Fishbein <[email protected]> wrote:
> I want to add a few things to sympy's matrices class such as image and
> kernel of a matrix. Both of these are represented as the span of a set of
> vectors.
> Spans will normally take the form of span(v1,v2,v3...,vx) where all vs are
> vectors of equal length.
> I'm not exactly sure how to represent these in python. Initially I was
> planning on a single vector with multiple variables
> for example
> m = Matrix([1, 2], [3, 4])
> print m.image() #probably also implement a pretty print
> [x+2y, 3x+4y]
> # [x   + 2y]
> # [3x + 4y]  ## pprint possibility
> ## I'm not sure if x,y = real is implied or not
> However, it also could be implemented like
> print m.image()
> span([1, 3], [2, 4])
> #         /  [1]    [2] \
> # span|   [  ]    [ ]  |  #pprint possibility
> #         \  [3]  , [4] /
> It could also be a regular matrix with a special property such as
> span = true
> m = Matrix([1, 2], [3, 4])
> m.setSpan() = true
> Though admittedly I haven't completely worked out how this would work/be
> implemented with out making the syntax inconsistent between multiple
> matrices.
>
> I'm just looking for some 2 cents about what you think would be best/most
> consistent with the rest of sympy
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to