SeparableSum.__getitem__¶
- SeparableSum.__getitem__(indices)[source]¶
Return
self[index]
.- Parameters:
- indicesindex expression
Object determining which parts of the sum to extract.
- Returns:
- subfunctional
Functional
orSeparableSum
Functional corresponding to the given indices.
- subfunctional
Examples
>>> space = odl.rn(3) >>> l1 = odl.solvers.L1Norm(space) >>> l2 = odl.solvers.L2Norm(space) >>> f_sum = odl.solvers.SeparableSum(l1, l2, 2*l2)
Extract single sub-functional via integer index:
>>> f_sum[0] L1Norm(rn(3))
Extract subset of functionals:
>>> f_sum[:2] SeparableSum(L1Norm(rn(3)), L2Norm(rn(3)))