Ticket #1488 (closed defect: fixed)
[patch, with positive review] fix output of symbolic vectors
| Reported by: | was | Owned by: | was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-2.9 |
| Component: | linear algebra | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
On Dec 13, 2007 9:39 AM, pgdoyle <petergrantdoyle@gmail.com> wrote:
>
> The vector v2 doesn't display properly in the attached Sage output.
> Or rather, the free module element v2.
> (Should I be worried that I got a free module element when I expected
> a vector, or will everything work out for the best?)
Vectors are elements of "free modules" :-). The "vector" command is just
a command to create vectors.
The output of vectors with symbolic entries is crap, as you illustrate below.
I've fixed this:
>
> Cheers,
>
> Peter
> -----------------------------------
> sage: v1=vector([1/2,1/2])
> sage: v1
> (1/2, 1/2)
> sage: type(v1)
> <type 'sage.modules.vector_rational_dense.Vector_rational_dense'>
> sage: v2=vector([x/(2*x),x/(2*x)])
> sage: v2
> ( 1
> -
>
> 2, 1
> -
> 2)
> sage: type(v2)
> <type
> 'sage.modules.free_module_element.FreeModuleElement_generic_dense'>
> sage: type(v2[1])
> <class 'sage.calculus.calculus.SymbolicArithmetic'>
Attachments
Change History
comment:1 Changed 5 years ago by malb
- Summary changed from [with easy patch] fix output of symbolic vectors to [with easy refereed patch] fix output of symbolic vectors
looks good.
Note: See
TracTickets for help on using
tickets.

