def _is_power_of_two()

in jupyter/comparison-to-datasketch/cardinality_error_experiment.py [0:0]


    def _is_power_of_two(self, a):
        """Bitwise operations to check value a is a power of two"""
        return (a & (a-1) == 0) and a != 0