1 | initial version |
See the documentation on charts, particularly the arguments coordinates
and names
.
For example, you can do the following:
sage: x = U.chart(names=tuple('x_%d' % i for i in range(2*p*q)))
sage: x[:]
(x_0, x_1, x_2, x_3)
sage: x[0]
x_0
2 | No.2 Revision |
See the documentation on charts, particularly the arguments coordinates
and names
.
For example, you can do the following:
sage: x = U.chart(names=tuple('x_%d' % i for i in range(2*p*q)))
sage: x[:]
(x_0, x_1, x_2, x_3)
sage: x[0]
x_0
Another example, upon request:
x_indices = [(i,j,k) for i in range(2) for j in range(2) for k in range(2)]
M = Manifold(len(x_indices), 'M', field='complex')
U = M.open_subset('U')
x_names = tuple('x_{}_{}_{}'.format(i,j,k) for (i,j,k) in x_indices)
x_coords = U.chart(names=x_names)
x = dict(zip(x_indices,x_coords))
Then you can do:
sage: x[(0,0,0)]
x_0_0_0