Open GoogleCodeExporter opened 9 years ago
Maybe the matrix class can be split into two classes at the implementation
level? The
inner class could use a numpy-compatible interface, so numpy.array could just be
swapped in, and the outer class could provide the mpmath interface? The
semantics of
the most basic matrix operations should be equivalent. Even mp could use numpy
when
available, just for the benefit of slightly faster array operations. So I think
most
of this could be done in matrices.py. (mp would just have to override __mul__
for the
faster fdot-based version)
For lu_solve and similar methods, I think ctx_fp.py would be the right place to
overload the default ones.
Original comment by fredrik....@gmail.com
on 17 Jan 2010 at 9:01
Wouldn't we get numpy as a dependency this way?
Original comment by Vinzent.Steinberg@gmail.com
on 17 Jan 2010 at 9:21
Not any different from gmpy.
try:
import numpy
have_numpy = True
except ImportError:
have_numpy = False
Original comment by fredrik....@gmail.com
on 17 Jan 2010 at 9:26
Original issue reported on code.google.com by
Vinzent.Steinberg@gmail.com
on 17 Jan 2010 at 8:35