21.01.2012 16:06, Zoltán пишет:
> 
>> I'm not sure exactly what the difficulty is that you are imagining.
>> There are several routines in SymPy that don't work well when you use
>> floats, so you have to work around the "features'.
> 
> I don't think that "imagining" is the proper word here: the problem is
> very real, as I have demonstrated in two simple cases. This is
> certainly not a result of my imagination. I think this whole argument
> could have been avoided, if it was stipulated in the documentation
> that floats don't work. I have read 
> http://docs.sympy.org/dev/modules/matrices.html
> , but nowhere was any reference to problems related to float entries.
> 

>>>>> Matrix(3,3,[nsimplify(w) for w in [1., 2, 2, 2, 1., 0, 2, 0, 
>>>>> 1.1]]).diagonalize()
>>
>> seems to work ok. Perhaps nsimlify could be made to recognize Matrix
>> so one could do nsimplify(m)...but just simplifying the data before
>> creating the Matrix isn't too bad.
> 
> Yes, this definitely works, but I could not imagine what could be
> simpler than 1.1 as an entry. Besides, a call to nsimplify does not
> make execution faster:(
> In any case, the bottom line seems to be that sympy should not be used
> for diagonalising float matrices.
> Cheers,
> Zoltán
> 

I agreed that this problem exists: the problem with the `diagonalize`
method, which is based on the problem of the calculation of the
eigenvectors for some eigenvalues  when the cases are not trivial. (And
more deeply, in common cases, in particular, it is (or was) related with
complex numbers, and with the so called zero-test problem: the complex
theoretical problem how to determine whether the symbolic expression is
zero or not). Now you added an example for the floats.

It is somehow described only in that issue [1]. Although only an
approximate location of the problem is described there.
I have accepted, and I am marked for this issue as owner, and fill
myself to continue with it.

And I agreed that the `nsimplify` can be considered only as a temporary
roundabout way.

As this issue is almost year old we must decide indeed, either to
describe it in the documentation or to increase the priority of the issue.

For my part, I am going to deal with it in a few weeks only (when I have
free time).

Now I attached your examples to that issue.

Thank you and others for raising the interest in this problem.

I hope it will be resolved soon.

[1] http://code.google.com/p/sympy/issues/detail?id=2193
-- 
Alexey U.

-- 
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