mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 20:34:38 +01:00
Fix compatibility against numpy 2.0
This commit is contained in:
parent
b8a667b3a1
commit
792abcb710
@ -620,14 +620,14 @@ def transport_distribution(sum_k, beta, directions=['xx'], energy_window=None, O
|
|||||||
print("Omega mesh automatically repined to: ", temp_Om_mesh)
|
print("Omega mesh automatically repined to: ", temp_Om_mesh)
|
||||||
|
|
||||||
Gamma_w = {direction: numpy.zeros((len(temp_Om_mesh), n_om),
|
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
|
# Sum over all k-points
|
||||||
ikarray = numpy.array(list(range(sum_k.n_k)))
|
ikarray = numpy.array(list(range(sum_k.n_k)))
|
||||||
for ik in mpi.slice_array(ikarray):
|
for ik in mpi.slice_array(ikarray):
|
||||||
# Calculate G_w for ik and initialize A_kw
|
# 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)
|
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)]
|
||||||
|
|
||||||
for isp in range(n_inequiv_spin_blocks):
|
for isp in range(n_inequiv_spin_blocks):
|
||||||
|
@ -32,7 +32,7 @@ omega_range_elk = SK.spectral_contours(broadening=0.01, mesh=mesh, plot_range=(-
|
|||||||
Converter = ElkConverter(filename='SrVO3', repacking=True)
|
Converter = ElkConverter(filename='SrVO3', repacking=True)
|
||||||
Converter.hdf_file = 'elk_spectralcontours_convert.out.h5'
|
Converter.hdf_file = 'elk_spectralcontours_convert.out.h5'
|
||||||
ngrid=np.array([10,10,1],np.int_)
|
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)
|
Converter.convert_contours_input(kgrid=kgrid,ngrid=ngrid)
|
||||||
SK2 = SumkDFTTools(hdf_file='elk_spectralcontours_convert.out.h5', use_dft_blocks=True)
|
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)
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user