Opened 4 years ago

Closed 4 years ago

#26835 closed defect (fixed)

Failing introspection with wildcards on matrices / remove M.I

Reported by: nthiery Owned by:
Priority: major Milestone: sage-8.5
Component: linear algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges



    sage: M = random_matrix(QQ, 3,4)
    sage: M.*row*?
    sage.matrix.matrix_rational_dense.Matrix_rational_dense.inverse (build/cythonized/sage/matrix/matrix_rational_dense.c:8519)()
    717         """
    718         if self._nrows != self._ncols:
--> 719             raise ArithmeticError("self must be a square matrix")
    721         if self._nrows == 0:

    ArithmeticError: self must be a square matrix

Analysis: M has an attribute I which is supposed to evaluate to the inverse of M. When ipython does its introspection to recover the list of attributes of M with M.*row*?, that attribute is evaluated. Which triggers an error since M is not square.

Proposed solution: remove M.I that was deprecated two years ago in #20904 .

Change History (3)

comment:1 Changed 4 years ago by nthiery

M.I was actually removed in #26647. Testing now whether introspection works. If yes, I'll close the ticket as resolved.

comment:2 Changed 4 years ago by nthiery

sage: M = random_matrix(QQ, 3,4)
sage: M.*row*?

So this works now. Cool!

comment:3 Changed 4 years ago by nthiery

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.