id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
22520 Fix display of tensors on free modules of finite rank egourgoulhon "The following is a bug:
{{{
sage: M = FiniteRankFreeModule(SR, 3, name='M')
sage: e = M.basis('e')
sage: t = SR.var('t', domain='real')
sage: (2*e[0]).display()
2 e_0
sage: (t*e[0]).display()
0
}}}
The outcome of the last line should be `t e_0`. This bug arises because of the nonzero check performed to avoid displaying zero components. This check is written as `t != 0`, which returns `False`. The fix proposed in this ticket is to replace it by `not (t==0)`, which returns `True`." defect closed major sage-7.6 linear algebra fixed tensor tscrim Eric Gourgoulhon Travis Scrimshaw N/A 7c02ed84fdce8c7c6fb2b1a9518c26a215f932c6 7c02ed84fdce8c7c6fb2b1a9518c26a215f932c6