Skip to content

Commit

Permalink
Subtlety...
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfellows committed Jul 9, 2019
1 parent 821641f commit 3caed43
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_possible_masks(n_keys, mask_width=32, contiguous_keys=True):
:rtype: iterable(int)
"""
# Starting values
n_zeros = n_keys.bit_length()
n_zeros = (n_keys - 1).bit_length()
assert n_zeros <= mask_width
all_ones_mask = (1 << mask_width) - 1

Expand Down

0 comments on commit 3caed43

Please sign in to comment.