### Question:
KeanuRandom { public DoubleTensor nextGaussian(long[] shape) { final int length = getLengthAsInt(shape); if (length > 1) { return DoubleTensor.create(nextGaussianBuffer(length), shape); } else { return DoubleTensor.create(nextGaussian(), shape); } } KeanuRandom();  KeanuRandom(long seed); static KeanuRandom getDefaultRandom(); static void setDefaultRandomSeed(long seed); DoubleTensor nextDouble(long[] shape); double nextDouble(); double nextDouble(double min, double max); double nextDoubleNonZero(); DoubleTensor nextGaussian(long[] shape); DoubleTensor nextGaussian(long[] shape, DoubleTensor mu, DoubleTensor sigma); DoubleTensor nextGamma(long[] shape, DoubleTensor theta, DoubleTensor k); DoubleTensor nextLaplace(long[] shape, DoubleTensor mu, DoubleTensor beta); double nextGaussian(); double nextGaussian(double mu, double sigma); boolean nextBoolean(); IntegerTensor nextInt(long[] shape); IntegerTensor nextPoisson(long[] shape, DoubleTensor mu); int nextInt(int maxExclusive); int nextInt();  }### Answer:
@Test public void canSampleGaussianScalar() { assertEquals(0, random.nextGaussian(new long[0]).getRank()); assertEquals(1, random.nextGaussian(new long[]{1}).getRank()); assertEquals(2, random.nextGaussian(new long[]{1, 1}).getRank()); assertEquals(2, random.nextGaussian(new long[]{2, 3}).getRank()); }
@Test public void canGetStandardDeviationOfGaussian() { DoubleTensor A = random.nextGaussian(new long[]{1000}).times(5.0); Assert.assertEquals(5.0, A.standardDeviation().scalar(), 0.1); }