The canonicalize() function uses tuple(set()) to try to get a
canonical ordering.  But apparently in Python 2.7, this ordering isn't
always the same on the same line in the same session.  I think it
should just compare sets directly.

Aaron Meurer

On Jul 18, 4:50 pm, "Aaron S. Meurer" <asmeu...@gmail.com> wrote:
> I bisected it down to bf301ae59e0943496b2e859341fc9c5677db1b64.  Looking 
> deeper, I get:
>
> In [20]: i = canonicalize(M.eigenvects())
> In [21]: j = canonicalize(                                                    
>                                                                               
>             
>           [( 2, 1, [Matrix([R(2,3), R(1,3), 1])]),                            
>                                                                               
>                                               
>            (-1, 1, [Matrix([-1, 1, 0])]),                                     
>                                                                               
>                                              
>            ( 0, 1, [Matrix([ 0,-1, 1])])])
>
> In [25]: i
> ⎛⎛0, 1, ⎛⎡0 ⎤,⎞⎞, ⎛-1, 1, ⎛⎡-1⎤,⎞⎞, ⎛2, 1, ⎛⎡2/3⎤,⎞⎞⎞⎜⎜      ⎜⎢  ⎥ ⎟⎟  ⎜      
>  ⎜⎢  ⎥ ⎟⎟  ⎜      ⎜⎢   ⎥ ⎟⎟⎟
> ⎜⎜      ⎜⎢-1⎥ ⎟⎟  ⎜       ⎜⎢1 ⎥ ⎟⎟  ⎜      ⎜⎢1/3⎥ ⎟⎟⎟⎜⎜      ⎜⎢  ⎥ ⎟⎟  ⎜      
>  ⎜⎢  ⎥ ⎟⎟  ⎜      ⎜⎢   ⎥ ⎟⎟⎟
> ⎝⎝      ⎝⎣1 ⎦ ⎠⎠  ⎝       ⎝⎣0 ⎦ ⎠⎠  ⎝      ⎝⎣ 1 ⎦ ⎠⎠⎠
>
> In [26]: j
> ⎛⎛2, 1, ⎛⎡2/3⎤,⎞⎞, ⎛0, 1, ⎛⎡0 ⎤,⎞⎞, ⎛-1, 1, ⎛⎡-1⎤,⎞⎞⎞
> ⎜⎜      ⎜⎢   ⎥ ⎟⎟  ⎜      ⎜⎢  ⎥ ⎟⎟  ⎜       ⎜⎢  ⎥ ⎟⎟⎟
> ⎜⎜      ⎜⎢1/3⎥ ⎟⎟  ⎜      ⎜⎢-1⎥ ⎟⎟  ⎜       ⎜⎢1 ⎥ ⎟⎟⎟
> ⎜⎜      ⎜⎢   ⎥ ⎟⎟  ⎜      ⎜⎢  ⎥ ⎟⎟  ⎜       ⎜⎢  ⎥ ⎟⎟⎟
> ⎝⎝      ⎝⎣ 1 ⎦ ⎠⎠  ⎝      ⎝⎣1 ⎦ ⎠⎠  ⎝       ⎝⎣0 ⎦ ⎠⎠⎠
>
> It looks like it only fails in Python 2.7, so that must be the problem.
>
> Also, there are a ton of failures in Python 2.4, due to you not importing 
> any/all in a few files.
>
> Aaron Meurer
> On Jul 18, 2010, at 5:34 AM, smichr wrote:
>
>
>
>
>
> > On Jul 18, 12:19 am, "Aaron S. Meurer" <asmeu...@gmail.com> wrote:
> >> Testing what is the latest version (1d6bd1d), I get this failure:
>
> >>   File 
> >> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/matrices/tests/test_
> >>  matrices.py", line 489, in test_eigen
> >>     ( 0, 1, [Matrix([ 0,-1, 1])])])
> >> AssertionError
>
> > Same commit here passes without problems under Windows and under the
> > 64-bit Linux.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@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