Skip to content

Commit

Permalink
replace np.infty by np.inf
Browse files Browse the repository at this point in the history
  • Loading branch information
minyez committed Jul 9, 2024
1 parent 13c844a commit 152026a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mushroom/core/bs.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def compute_band_edges(self, reload: bool = False):
Note:
When nbands is too small and all bands are found to be valence bands,
or it is the case for one spin-kpoint channel, the corresponding CB will
be set to ``np.infty``.
be set to ``np.inf``.
Setup of indices of CB remains, thus IndexError might be raised when trying
get CB value from `icbm` attributes
Expand Down Expand Up @@ -493,7 +493,7 @@ def _load_band_edges_by_occ(self):
info = "VBM index for spin-kpt channel (%d,%d) equals nbands. %s"
_logger.warning(
info, i + 1, j + 1, "CBM for this channel set to infinity")
self._cbm_sp_kp[i, j] = np.infty
self._cbm_sp_kp[i, j] = np.inf
else:
self._cbm_sp_kp[i, j] = self.eigen[i, j, vb + 1]
# VB indices
Expand Down Expand Up @@ -535,12 +535,12 @@ def _load_band_edges_by_eigen(self):
self._ivbm = np.zeros(3, dtype=int)
self._icbm = np.zeros(3, dtype=int)

self._vbm_sp_kp[:, :] = -np.infty
self._cbm_sp_kp[:, :] = np.infty
self._vbm_sp[:] = -np.infty
self._cbm_sp[:] = np.infty
self._vbm = -np.infty
self._cbm = np.infty
self._vbm_sp_kp[:, :] = -np.inf
self._cbm_sp_kp[:, :] = np.inf
self._vbm_sp[:] = -np.inf
self._cbm_sp[:] = np.inf
self._vbm = -np.inf
self._cbm = np.inf

# a naive way to find VBM and CBM on each spin and kpoint channel
for isp in range(self._nspins):
Expand Down

0 comments on commit 152026a

Please sign in to comment.