Comment #11 on issue 3742 by matt...@gmail.com: rref very slow
http://code.google.com/p/sympy/issues/detail?id=3742
In [1]: from sympy.polys.solvers import RawMatrix
In [2]: from sympy.polys.fields import vfield
In [3]: vfield("a_(1:5)(1:5)", ZZ)
Out[3]:
Rational function field in a_11, a_12, a_13, a_14, a_21, a_22, a_23, a_24,
a_31, a_32, a_33, a_34, a_41, a_42, a_43, a_44 over ZZ with lex
order
In [4]: M = RawMatrix([[a_11*a_12, a_21*a_22, 1], [a_31*a_32, a_41*a_42,
0]])
In [5]: M.rref(iszerofunc=lambda x: not x, simplify=lambda x: x)
Out[5]:
⎛⎡1 0 a_41*a_42/(a_11*a_12*a_41*a_42 - a_21*a_22*a_31*a_32) ⎤, [0, 1]⎞
⎜⎢ ⎥ ⎟
⎝⎣0 1 -a_31*a_32/(a_11*a_12*a_41*a_42 - a_21*a_22*a_31*a_32)⎦ ⎠
Replace contents of RawMatrix(...) with your data. The point is not to use
Symbol() and symbolic expressions but (in this case) efficient rational
function representation. You have to use RawMatrix and you have to call
rref() the way I showed, otherwise it won't work (at least for the time
being).
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.