def random_normal_like(x, loc, scale):
    if not isinstance(x, np.ndarray):
        return gp.randn(*x.shape) * scale + loc
    else:
        return np.random.normal(loc, scale, x.shape)
.. todo::
dataset/ETHPy150Open BRML/climin/climin/mathadapt.py/random_normal_like--crossover with--dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/dbm/ising.py/init_tanh_bias_from_marginals