10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-19 04:22:32 +01:00

fix array handling for single kpt

This commit is contained in:
Kevin Gasperich 2023-10-03 12:45:59 -05:00
parent 016494e4d8
commit 8590b1d47a

View File

@ -135,7 +135,7 @@ def make_reim_identity_kblocks(nk,nm,na=None):
def make_reim_identity_block_diag(nk,nm,na=None):
from scipy.linalg import block_diag
kblocks = make_reim_identity_kblocks(nk,nm,na).view(dtype=np.complex128).squeeze()
kblocks = make_reim_identity_kblocks(nk,nm,na).view(dtype=np.complex128).squeeze(axis=3)
kblockdiag = block_diag(*kblocks).view(dtype=np.float64).reshape((nk*nm,nk*na,2))
print(f'kblockdiag.shape = {kblockdiag.shape}')
return kblockdiag