# TypeError: 'SumBlockedOperator' object is not subscriptable

**URL:** <https://bempp.discourse.group/t/typeerror-sumblockedoperator-object-is-not-subscriptable/237>\
**Category:** Bempp\
**Created:** [27 February 2024 16:11 UTC](https://bempp.discourse.group/t/typeerror-sumblockedoperator-object-is-not-subscriptable/237 "2024-02-27T16:11:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerard](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@gerard](https://bempp.discourse.group/u/gerard)\
**Post date:** [27 February 2024 16:11 UTC](https://bempp.discourse.group/t/typeerror-sumblockedoperator-object-is-not-subscriptable/237/1 "2024-02-27T16:11:03Z")

</div>

Hello all,  
with BEMpp 0.3.1, when trying the snippets of figures 9 (preconditioned EFIE) and 13 (MFIE) extract from the 2017 amazing paper [Redirecting](http://dx.doi.org/10.1016/j.camwa.2017.07.049).

```auto
import numpy as np
import bempp.api
from bempp.api.operators.boundary import maxwell
from bempp.api.operators.boundary import sparse
k=2
grid=bempp.api.shapes.cube(h=0.2)

def incident_field(x):
    return np.array([np.exp(1j*k*x[2]),0.*x[2],0.*x[2]])

@bempp.api.complex_callable
def tangential_trace(x,n,domain_index,result):
    result[:]=np.cross(np.array([1.,0.,0.]),n)*np.exp(1j*k*x[2])

#multitrace=maxwell.multitrace_operator(grid,k) # Lead to error when calculating E1
multitrace=maxwell.multitrace_operator(grid,k,space_type='all_rwg')
#identity=sparse.multitrace_identity(multitrace),spaces='maxwell') # doesn't work
identity=sparse.multitrace_identity(multitrace)
calderon=0.5*identity-multitrace

op=-calderon[0,0]
rhs=bempp.api.GridFunction(calderon.domain_spaces[0],fun=tangential_trace,dual_space=calderon.dual_to_range_spaces[0])
sol,info=bempp.api.linalg.gmres(op,rhs,use_strong_form=True)

```

we got error:

```auto
bempp:HOST:INFO: Created grid with id b3e09375-25df-4aa4-bc2d-82d2d4927082. Elements: 2400. Edges: 3600. Vertices: 1202

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[4], line 21
     18 identity=sparse.multitrace_identity(multitrace)
     19 calderon=0.5*identity-multitrace
---> 21 op=-calderon[0,0]
     22 rhs=bempp.api.GridFunction(calderon.domain_spaces[0],fun=tangential_trace,dual_space=calderon.dual_to_range_spaces[0])
     23 sol,info=bempp.api.linalg.gmres(op,rhs,use_strong_form=True)

TypeError: 'SumBlockedOperator' object is not subscriptable

```

Any idea?

Thanks in advance for help,

Gérard
