-
-
Notifications
You must be signed in to change notification settings - Fork 655
Closed
Milestone
Description
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
.
CC: @tscrim
Component: linear algebra
Keywords: tensor
Author: Eric Gourgoulhon
Branch/Commit: 7c02ed8
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/22520