pnet/bernoullimm.py