arbitrary precision linear algebra

Ben123 ben.is.located at gmail.com
Wed Mar 2 13:47:46 EST 2011


On Mar 2, 12:22 pm, geremy condra <debat... at gmail.com> wrote:
> On Wed, Mar 2, 2011 at 10:21 AM, geremy condra <debat... at gmail.com> wrote:
> > On Wed, Mar 2, 2011 at 6:42 AM, Ben123 <ben.is.loca... at gmail.com> wrote:
> >> Hello. I have a written Python program which currently uses numpy to
> >> perform linear algebra operations. Specifically, I do matrix*matrix,
> >> matrix*vector, numpy.linalg.inv(matrix), and linalg.eig(matrix)
> >> operations. Now I am interested in allowing arbitrary precision. I
> >> have tried gmpy, bigfloat, mpmath, and decimal but I have been unable
> >> to easily implement any with my current program. I suspect I have to
> >> change some commands but I am unsure what.
>
> >> My question is which of the arbitrary precision implementations will
> >> most easily handle linear algebra? I don't care about speed, just ease
> >> of use. Online tutorials for arbitrary precision linear algebra
> >> operations would be useful.
>
> >> For example, it looks like mpmath can handle matrix operations
> >>http://fredrik-j.blogspot.com/search?q=matrix
> >> but I was unable to find a clear tutorial. The tutorials for most of
> >> the arbitrary precision implementations demonstrate simple scalar
> >> examples.
>
> >> Thanks in advance
>
> > Have you looked at Sage[0]? I don't know for a fact, but you should be
> > able to define a matrix over RealField(precision_in_bits) and then
> > take the eigenvalue of it. I don't know if it will actually produce
> > the precision you need though.
>
> > Geremy Condra
>
> Apologies, forgot the links:
>
> http://www.sagemath.org/doc/constructions/linear_algebra.htmlhttp://www.sagemath.org/doc/reference/sage/rings/complex_field.html
>
> Geremy Condra

I'm not sufficiently familiar with Sage, but from
http://www.sagemath.org/doc/constructions/linear_algebra.html

"currently Sage does not implement multiprecision numerical
eigenvalues/eigenvectors"

I'll ask on the Sage forums about this. In the mean time, I'm still
trying to get arbitrary precision linear algebra in Python



More information about the Python-list mailing list