We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ed487ca + 1cd830d commit 8398dc5Copy full SHA for 8398dc5
1 file changed
topostats/tracing/nodestats.py
@@ -1700,6 +1700,8 @@ def compile_metrics(self) -> None:
1700
"""Add number of crossings, mean and minimum crossing confidence to the ``grain_crops.stats`` dictionary."""
1701
# Add Node Statistics to GrainCrop.stats for each class and subgrain
1702
num_crossings = (self.node_centre_mask == 3).sum()
1703
+ # Avoid NaN values
1704
+ num_crossings = 0 if num_crossings is None else num_crossings
1705
mean_conf, min_conf = self.crossing_confidence_statistics()
1706
for class_number, stats in self.grain_crop.stats.items():
1707
for subgrain_index, _ in stats.items():
0 commit comments