torch/torch7 — pull request #43 by fidlej (2014-06-11 10:12:59+00:00)
Title: Used double to hold the 'p' for bernoulli() and geometric()

The following call was generating 100 zeros:

torch.bernoulli(torch.ByteTensor(100), 0.5)

The 0.5 probability was converted to 0, when casting the argument to 'unsigned char'.
I now used double to hold the probability.