#17663: clean sparse matrices
-------------------------+-------------------------------------------------
Reporter: | Owner:
vdelecroix | Status: needs_review
Type: | Milestone: sage-6.5
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers: Martin von Gagern
linear algebra | Work issues:
Keywords: | Commit:
Authors: | b52ad708d1190c4b5de75bcbafd4f59c13a5c84b
Vincent Delecroix | Stopgaps:
Report Upstream: N/A |
Branch: |
public/17663 |
Dependencies: |
#17658 |
-------------------------+-------------------------------------------------
Comment (by vdelecroix):
Replying to [comment:13 gagern]:
> The nonzero doctest has me confused:
>
> {{{
> sage: bool(m)
> False
> sage: m.is_zero() # indirect doctest
> True
> }}}
> Why is the first expected to be false?
> Shouldn't a zero matrix evaluate as zero?
It is like 0
{{{
sage: bool(0)
False
sage: 0.is_zero()
True
}}}
We have zero <-> False and non-zero <-> True
> Isn't one invariant the fact that all entries in the dict must be non-
zero?
Yes, it is. So that the matrix is zero if and only if the dict is empty.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17663#comment:14>
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/d/optout.