Commit 2c3655cb authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: force rounding of 0.5 up to the next integer

parent e2d31c35
......@@ -115,7 +115,9 @@ def isSparse(data,
# Turn proportion into
# an absolute count
if not isabs:
val = np.ceil(val * ntotal)
val = val * ntotal
if (val % 1) >= 0.5: val = np.ceil(val)
else: val = np.floor(val)
# ignore the threshold if it is
# bigger than the total data length
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment