einsum now compatible with numpy 1.14
This commit is contained in:
parent
13500a6443
commit
622d038932
|
@ -38,7 +38,7 @@ def gradFFT(geomdim,field):
|
||||||
if dataType == 'vector': # vector, 3 -> 3x3
|
if dataType == 'vector': # vector, 3 -> 3x3
|
||||||
grad_fourier = np.einsum('ijkl,ijkm->ijklm',field_fourier,k_s)*TWOPIIMG
|
grad_fourier = np.einsum('ijkl,ijkm->ijklm',field_fourier,k_s)*TWOPIIMG
|
||||||
elif dataType == 'scalar': # scalar, 1 -> 3
|
elif dataType == 'scalar': # scalar, 1 -> 3
|
||||||
grad_fourier = np.einsum('ijkl,ijkl->ijkl',field_fourier,k_s)*TWOPIIMG
|
grad_fourier = np.einsum('ijkl,ijkm->ijkm',field_fourier,k_s)*TWOPIIMG
|
||||||
|
|
||||||
return np.fft.irfftn(grad_fourier,axes=(0,1,2),s=shapeFFT).reshape([N,3*n])
|
return np.fft.irfftn(grad_fourier,axes=(0,1,2),s=shapeFFT).reshape([N,3*n])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue