Skip to content

Commit

Permalink
return bool instead of np.bool_
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmshn committed Sep 20, 2024
1 parent ea7c339 commit fc6d1f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pymatgen/core/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def is_valid(self, tol: float = DISTANCE_TOLERANCE) -> bool:
if len(self) == 1:
return True
all_dists = self.distance_matrix[np.triu_indices(len(self), 1)]
return np.min(all_dists) > tol
return bool(np.min(all_dists) > tol)

@abstractmethod
def to(self, filename: str = "", fmt: FileFormats = "") -> str | None:
Expand Down

0 comments on commit fc6d1f1

Please sign in to comment.