You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems fixed now (in 3.2.1). However there are other similar issues, like:
sage: a=(QQ^3).subspace([[1,0,1]])
sage: b=a.basis()[0]
sage: b/b.norm()
(1/sqrt(2), 0, 1/sqrt(2))
sage: b-b/b.norm()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/grout/<ipython console> in <module>()
/home/grout/sage/local/lib/python2.5/site-packages/sage/structure/element.so in sage.structure.element.ModuleElement.__sub__ (sage/structure/element.c:6073)()
/home/grout/sage/local/lib/python2.5/site-packages/sage/structure/coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:5805)()
TypeError: unsupported operand parent(s) for '-': 'Vector space of degree 3 and dimension 1 over Rational Field
Basis matrix:
[1 0 1]' and 'Vector space of degree 3 and dimension 1 over Symbolic Ring
User basis matrix:
[1 0 1]'
It also seems like the operation above takes way too long:
sage: %time b/b.norm()
CPU times: user 0.48 s, sys: 0.14 s, total: 0.62 s
Wall time: 2.02 s
(1/sqrt(2), 0, 1/sqrt(2))
sage: %time b.norm()
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
sqrt(2)
The title is what I think is the real issue here:
Note that the following does work:
Component: coercion
Issue created by migration from https://trac.sagemath.org/ticket/3058
The text was updated successfully, but these errors were encountered: