Skip to content

Commit c7ff850

Browse files
zhengjiang shaozhengjiang shao
authored andcommitted
Fix scipy.integrate.simps removed in scipy 1.14+
Use simpson (new name) with fallback to simps for older scipy versions. Co-Authored-By: deepseek-v4-pro
1 parent b8b35ed commit c7ff850

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

vaspy/electro.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
from string import whitespace
1515

1616
import numpy as np
17-
from scipy.integrate import simps
17+
try:
18+
from scipy.integrate import simpson as simps
19+
except ImportError:
20+
from scipy.integrate import simps
1821
from scipy.interpolate import interp2d
1922
import mpl_toolkits.mplot3d
2023

0 commit comments

Comments
 (0)