Hi Fredrik, On Tue, Jul 5, 2011 at 2:47 PM, Fredrik Johansson <[email protected]> wrote: > Hi, > > I have created the beginning of an easy-to-use Python wrapper for > FLINT 2: http://fredrik-johansson.github.com/python-flint/ > > It currently provides numbers, (dense univariate) polynomials and > (dense) matrices over Z/nZ (for word-size n), Z and Q. > > In [1]: import flint > In [2]: A = flint.fmpz_poly(range(10000)); B = A + 1 > In [3]: %timeit A * B > 100 loops, best of 3: 4.68 ms per loop > In [4]: from random import randint > In [5]: M = flint.fmpz_mat(100,100,[randint(-3,3) for i in range(10000)]) > In [6]: %timeit M.det() > 100 loops, best of 3: 11.7 ms per loop > > I'm posting this here as there might be some interest in using the > FLINT types as faster ground types in SymPy (assuming that this is > technically possible with SymPy's current code structure). The fmpz > and fmpq types don't offer any advantage over gmpy's mpz and mpq types > (although the nmod type probably does), but the FLINT polynomials and > matrices of course are massively faster than Python > polynomials/matrices of such numbers. > > The code is in a very early state, and so far only a small set of the > functionality in FLINT 2 is wrapped. But it could potentially be of > interest to some people already.
Thanks for sharing it. Btw, the link to FLINT from your page: http://www.flintlib.org/ doesn't seem to be working. Ondrej -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
