Skip to content

Commit

Permalink
(fix) numpy array emptiness check is non-Pythonic
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavnatarajan committed Sep 24, 2024
1 parent a72b130 commit 4ce5ff1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "chalc"
version = "7.0.0"
version = "7.0.1"
authors = [{ name = "Abhinav Natarajan", email = "[email protected]" }]
description = "Persistent homology of chromatic Delaunay filtrations"
readme = { file = "README.md", content-type = "text/markdown" }
Expand Down
2 changes: 1 addition & 1 deletion src/chalc/sixpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def get_matrix(self, diagram_name, dim=None):
for s in dgm._unpaired:
simplices.add(s)
relevant_dims = np.array(self._dimensions)[list(simplices)]
if not relevant_dims:
if relevant_dims.size == 0 or relevant_dims.ndim == 0:
# there are no features in the diagram
return []
dim = list(range(max(relevant_dims)))
Expand Down

0 comments on commit 4ce5ff1

Please sign in to comment.