Skip to content

Commit 09c8294

Browse files
committed
SOF-7417: refactor obsolete numpy ndarray.ptp() method
1 parent 5cdfc20 commit 09c8294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

express/properties/non_scalar/bandgaps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _find_gap(
157157
Returns:
158158
tuple: a (gap, k1, k2) tuple where k1 and k2 are the indices of the valence and conduction k-points.
159159
"""
160-
if occupations.ptp() > 0:
160+
if np.ptp(occupations) > 0:
161161
# Some band must be crossing fermi-level. Hence, we return zero for band gap and the actual k-points
162162
kv = kc = occupations.argmax()
163163
return 0.0, kv, kc

0 commit comments

Comments
 (0)