#14760: %psearch with non-invertible matrix fails
------------------------------+---------------------------------------------
Reporter: iandrus | Owner: was
Type: PLEASE CHANGE | Status: new
Priority: major | Milestone: sage-5.11
Component: user interface | Keywords: sage-mode ipython matrix
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------------+---------------------------------------------
Sage-mode uses `%psearch -a TEXT*` for tab completion. This doesn't work
for a matrix which isn't invertible:
{{{
sage: F = GF(2)
sage: M = Matrix(F,2,2,[0,1,0,1])
sage: %psearch -a M.*
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call
last)
/Users/ivanandres/SageStuff/sage-5.8.beta4/local/lib/python2.7/site-
packages/IPython/core/oinspect.pyc in psearch(self, pattern, ns_table,
ns_search, ignore_case, show_all)
836 namespaces_seen.add(id(ns))
837 tmp_res = list_namespace(ns, type_pattern, filter,
--> 838 ignore_case=ignore_case,
show_all=show_all)
839 search_result.update(tmp_res)
840
/Users/ivanandres/SageStuff/sage-5.8.beta4/local/lib/python2.7/site-
packages/IPython/utils/wildcard.pyc in list_namespace(namespace,
type_pattern, filter, ignore_case, show_all)
104 results = {}
105 for name, obj in filtered.iteritems():
--> 106 ns = list_namespace(dict_dir(obj), type_pattern,
107 ".".join(pattern_list[1:]),
108 ignore_case=ignore_case,
show_all=show_all)
/Users/ivanandres/SageStuff/sage-5.8.beta4/local/lib/python2.7/site-
packages/IPython/utils/wildcard.pyc in dict_dir(obj)
68 # thing. In particular, Traits use this pattern
69 try:
---> 70 ns[key] = getattr(obj, key)
71 except AttributeError:
72 pass
/Users/ivanandres/SageStuff/sage-5.8.beta4/local/lib/python2.7/site-
packages/sage/matrix/matrix2.so in sage.matrix.matrix2.Matrix.I.__get__
(sage/matrix/matrix2.c:62997)()
/Users/ivanandres/SageStuff/sage-5.8.beta4/local/lib/python2.7/site-
packages/sage/matrix/matrix2.so in sage.matrix.matrix2.Matrix.inverse
(sage/matrix/matrix2.c:40047)()
/Users/ivanandres/SageStuff/sage-5.8.beta4/local/lib/python2.7/site-
packages/sage/matrix/matrix_mod2_dense.so in
sage.matrix.matrix_mod2_dense.Matrix_mod2_dense.__invert__
(sage/matrix/matrix_mod2_dense.c:6905)()
ZeroDivisionError: Matrix does not have full rank.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14760>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.