Skip to content

Commit

Permalink
Fix compatibility against numpy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Jun 21, 2024
1 parent b8a667b commit 792abcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/triqs_dft_tools/sumk_dft_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,14 @@ def glist(): return [GfReFreq(target_shape=(block_dim, block_dim), window=(omega
print("Omega mesh automatically repined to: ", temp_Om_mesh)

Gamma_w = {direction: numpy.zeros((len(temp_Om_mesh), n_om),
dtype=numpy.float_) for direction in directions}
dtype=numpy.float64) for direction in directions}

# Sum over all k-points
ikarray = numpy.array(list(range(sum_k.n_k)))
for ik in mpi.slice_array(ikarray):
# Calculate G_w for ik and initialize A_kw
G_w = sum_k.lattice_gf(ik, mu, broadening=broadening, mesh=mesh, with_Sigma=with_Sigma)
A_kw = [numpy.zeros((sum_k.n_orbitals[ik][isp], sum_k.n_orbitals[ik][isp], n_om), dtype=numpy.complex_)
A_kw = [numpy.zeros((sum_k.n_orbitals[ik][isp], sum_k.n_orbitals[ik][isp], n_om), dtype=numpy.complex128)
for isp in range(n_inequiv_spin_blocks)]

for isp in range(n_inequiv_spin_blocks):
Expand Down
2 changes: 1 addition & 1 deletion test/python/elk/elk_spectralcontours_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Converter = ElkConverter(filename='SrVO3', repacking=True)
Converter.hdf_file = 'elk_spectralcontours_convert.out.h5'
ngrid=np.array([10,10,1],np.int_)
kgrid=np.array([[0.0,0.0,0.0],[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]],np.float_)
kgrid=np.array([[0.0,0.0,0.0],[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]],np.float64)
Converter.convert_contours_input(kgrid=kgrid,ngrid=ngrid)
SK2 = SumkDFTTools(hdf_file='elk_spectralcontours_convert.out.h5', use_dft_blocks=True)
fs_elk_user = SK2.spectral_contours(broadening=0.01, mesh=mesh, with_Sigma=False, with_dc=False, FS=True, proj_type='wann', save_to_file=False)
Expand Down

0 comments on commit 792abcb

Please sign in to comment.