On 07/02/2012 16:06, Jason Grout wrote:
On 2/7/12 9:55 AM, Marco Streng wrote:
On 07/02/2012 15:43, Jason Grout wrote:
On 2/7/12 9:34 AM, John H Palmieri wrote:
Or as part of the doctest "normalize" G.round(6): multiply by -1 if the
real part of the (0,0) entry is positive. If it gets too complicated,
maybe it should be moved to a TESTS block instead of an EXAMPLES block. I wonder what part of the algorithm leads to a difference choice of sign
on this one platform.

so something like:

sage: G.round(6)*sgn(G[0,0].real())

Thanks,

Jason



These are quite ugly solutions. How do people feel about having a
solution analogous to #10952?
http://trac.sagemath.org/sage_trac/ticket/10952

For example, let "# sign variation" ignore every +, -, and space in the
output string.

But then it would consider the two vectors (-1,2) and (-1,-2) to be the same, which is not what we want.

Jason




True, that is the biggest downside of this solution. But examples should be illustrative. It would be a shame to have a documentation of a function without any printed examples of the output of the function. Users may want to see what the output is supposed to look like, as a way of understanding what a function does. We can always add another test like M*M.transpose() below it if we really are afraid of getting (-1,-2) instead of (-1, 2).





--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to