File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 9
9
10
10
NMBITS = {64 : 12 , 32 : 9 , 16 : 6 } # number of non mantissa bits for given dtype
11
11
12
+
12
13
class BitInfo (BitRound ):
13
14
"""Floating-point bit information codec
14
15
@@ -233,18 +234,18 @@ def get_keepbits(info_per_bit, inflevel=0.99):
233
234
----------
234
235
info_per_bit : array
235
236
Information content of each bit from `get_bitinformation`.
236
-
237
+
237
238
inflevel : float
238
239
Level of information that shall be preserved.
239
240
240
241
Returns
241
242
-------
242
243
keepbits : int
243
244
Number of mantissa bits to keep
244
-
245
+
245
246
"""
246
247
if (inflevel < 0 ) or (inflevel > 1.0 ):
247
- raise ValueError ("Please provide `inflevel` from interval [0.,1.]" )
248
+ raise ValueError ("Please provide `inflevel` from interval [0.,1.]" )
248
249
249
250
cdf = _cdf_from_info_per_bit (info_per_bit )
250
251
bitdim_non_mantissa_bits = NMBITS [len (info_per_bit )]
You can’t perform that action at this time.
0 commit comments