Fix constant TMatrix bug in constmultipole rectarray

Former-commit-id: b767b7178b2c0c7ed8c438f17470d86fda48bea4
This commit is contained in:
Marek Nečada 2016-12-15 08:02:47 +02:00
parent e6d7663660
commit 82259b77f5
1 changed files with 1 additions and 0 deletions

View File

@ -1582,6 +1582,7 @@ def scatter_constmultipole_rectarray(omega, epsilon_b, xN, yN, xd, yd, TMatrices
pq_0 = np.broadcast_to(pq_0, (N, 2, nelem))
MP_0 = np.empty((N,2,nelem),dtype=np.complex_)
for j in range(N): # I wonder how this can be done without this loop...
xij, yij = xyind[j]
MP_0[j] = np.tensordot(TMatrices[xij, yij],pq_0[j],axes=([-2,-1],[-2,-1]))
MP_0.shape = (N*2*nelem,)