Skip to content

Commit 16bed29

Browse files
authored
Merge pull request #67 from lguerard/issues/57
Add notes to calculate_mean_and_stdv for empty input handling
2 parents 3e33174 + 0c97f2a commit 16bed29

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/imcflibs/imagej/misc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ def calculate_mean_and_stdv(values_list, round_decimals=0):
115115
-------
116116
tuple of (float, float)
117117
Mean and standard deviation of the input list.
118+
119+
Notes
120+
-----
121+
Returns (0, 0) when:
122+
- The input list is empty.
123+
- After filtering out None values, no elements remain.
118124
"""
125+
119126
filtered_list = [x for x in values_list if x is not None]
120127

121128
if not filtered_list:

0 commit comments

Comments
 (0)