2021-06-06 10:47:24 UTC+2, Cyrille Piatecki:
>
> [c[i] for i in range(0..2)] <-- this doesn't work
You are mixing two different options:
- range:
[c[i] for i in range(2)]
[c[i] for i in range(0, 2)]
- ellipsis:
[c[i] for i in (0 .. 2)]
--
You received this message because you are subscri
OK, one more time I feel stupid and one more time thanks to answer. But now
look at this
R = PolynomialRing(RR, 'c', 20)
c = R.gens()
c=vector([c[i] for i in (0..2)])
Z1=matrix([[1, 2],[3,4]])*vector([c[1],c[2]])
show(Z1)<--- correct display
But c and c[1] is not recognized. So I do not know how
Don't feel stupid, but learn from your mistakes.
Go beyond "this works / this doesn't work":
> [c[i] for i in range(0..2)] <-- this doesn't work
Read error messages, they contain useful information.
```
sage: [c[i] for i in range(0..2)]