Skip to content

Commit

Permalink
SOF-7417: refactor obsolete numpy ndarray.ptp() method
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Aug 8, 2024
1 parent 5cdfc20 commit 09c8294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion express/properties/non_scalar/bandgaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _find_gap(
Returns:
tuple: a (gap, k1, k2) tuple where k1 and k2 are the indices of the valence and conduction k-points.
"""
if occupations.ptp() > 0:
if np.ptp(occupations) > 0:
# Some band must be crossing fermi-level. Hence, we return zero for band gap and the actual k-points
kv = kc = occupations.argmax()
return 0.0, kv, kc
Expand Down

0 comments on commit 09c8294

Please sign in to comment.