Opened 8 years ago

Last modified 7 years ago

#14760 new defect

%psearch with non-invertible matrix fails

Reported by: iandrus Owned by: was
Priority: major Milestone: sage-6.4
Component: user interface Keywords: sage-mode ipython matrix
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


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)

/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/ 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/ 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/ in sage.matrix.matrix_mod2_dense.Matrix_mod2_dense.__invert__ (sage/matrix/matrix_mod2_dense.c:6905)()

ZeroDivisionError: Matrix does not have full rank.

Change History (5)

comment:1 Changed 8 years ago by iandrus

  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:4 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:5 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.