Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

List of multi indices and their sums

If I define:

def p(t):
return SR.var(('p' + '_{}'*len(t)).format(*[str(i) for i in t]))

I can get generic multi indices like

p((2, 4, 1, 3,9,8,0,9,6,1))
p_2_4_1_3_9_8_0_9_6_1

So far, I would like to know if I can get something like

p_24139_80961

and also how can I some the variables "p" in the second block of indices, for example for j in [1..10] I would like to sum all

p_24139_809j1

Any suggestions would be great.

List of multi indices and their sums

If I define:

def p(t):
return SR.var(('p' + '_{}'*len(t)).format(*[str(i) for i in t]))

I can get generic multi indices like

p((2, 4, 1, 3,9,8,0,9,6,1))
p_2_4_1_3_9_8_0_9_6_1

So far, I would like to know if I can get something like

p_24139_80961

and also how can I some sum the variables "p" in the second block of indices, for example for j in [1..10] I would like to sum all

p_24139_809j1

Any suggestions would be great.