Hi
I came across the following in sage/matrix/matrix2.pyx:14367:
@property
def I(self):
r"""
Returns the inverse of the matrix, if it exists.
<snip>
"""
return ~self
Basically, I don't understand why this def should be a property, and it
seems to me to be problematic. Specifically:
1) This is a property that can throw an exception. Isn't that a problem?
2) This is a property that runs a heavy computation when called. Isn't
that a problem?
I came across this because it currently breaks tab-completion on
matrices in the Emacs sage-mode: perhaps due to a bug, IPython inspects
the properties when tab-completing, so when a property throws an
exception, no tab-completion is given. That means that invertible
matrices don't tab-complete in sage-mode. The terminal is OK, and I
don't know about other interfaces.
There are other @property defs in that class, like conjugate and
hermitian.
Best,
Johan
--
You received this message because you are subscribed to the Google Groups
"sage-devel" 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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.