We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f38891b commit ffde755Copy full SHA for ffde755
numcodecs/bitinfo.py
@@ -266,8 +266,8 @@ def get_keepbits(info_per_bit, inflevel=0.99):
266
267
def _cdf_from_info_per_bit(info_per_bit):
268
"""Convert info_per_bit to cumulative distribution function"""
269
- # TODO this threshold isn't working yet
270
- #tol = info_per_bit[-4:].max() * 1.5
271
- #info_per_bit[info_per_bit < tol] = 0
+ # TODO this threshold doesn't match implementation in remove_insignificant.jl
+ tol = info_per_bit[-4:].max() * 1.1 # reduced from 1.5
+ info_per_bit[info_per_bit < tol] = 0
272
cdf = info_per_bit.cumsum()
273
return cdf / cdf[-1]
0 commit comments