code: public SDVariable bernoulli(String name, double p, long... shape) {
          SDVariable ret = f().randomBernoulli(p, shape);
          return updateVariableNameAndReference(ret, name);
      }
docs: Generate a new random SDVariable, where values are randomly sampled according to a Bernoulli distribution,
  with the specified probability. Array values will have value 1 with probability P and value 0 with probability
  1-P.<br>
  See {@link #bernoulli(String, double, SDVariable)}  for the equivalent function where the shape is
  specified as a SDVarible instead
  
  @param name  Name of the new SDVariable
  @param p     Probability of value 1
  @param shape Shape of the new random SDVariable, as a 1D array
  @return New SDVariable