/** * Generates random numbers or arrays of random numbers for a normal (Gaussian) distribution. * * Samples are exact, not approximations: numpy's 256-layer ziggurat (the legacy polar * method with the `'mt19937'` bit generator, as numpy's `RandomState`). * * @example * normal() // one N(0, 1) sample * normal(10, 2, [2, 3]) // 2x3 array of N(10, 2^2) samples * * @param {number} [loc=0.0] - The mean of the normal distribution to sample. 0.0 by default. * @param {number} [scale=1.0] - The standard deviation of the normal distribution to sample. 1.0 by default. * @param {number|Array|null} [size=null] - The shape of the output: * - If `null`, a single number is returned. * - If a number, a 1D array of the specified size is returned. * - If an array (e.g., [m, n]), a multidimensional array of the specified shape is returned. * @throws {Error} If `scale` is negative or the parameters are not numbers. * @returns {number|Array} A single sample, an array, or a multidimensional array of normal distributed numbers. */ export function normal(loc?: number, scale?: number, size?: number | any[] | null): number | any[]; /** * Draws samples from the standard normal distribution N(0, 1). * Equivalent to numpy's `standard_normal`. * * @param {number|Array|null} [size=null] - Output shape. * @returns {number|Array} Standard normal samples. */ export function standardNormal(size?: number | any[] | null): number | any[];