pub fn normal<T: Num, S: DimTrait, D: DeviceBase>(
mean: T,
std_dev: T,
shape: S,
seed: Option<u64>,
) -> Matrix<Owned<T>, S, D>where
StandardNormal: Distribution<T>,
Expand description
Creates a matrix filled with random values from a normal distribution.
§Arguments
mean
- The mean of the normal distribution.std_dev
- The standard deviation of the normal distribution.shape
- The shape of the matrix.seed
- An optional seed for the random number generator.
§Panics
Normal distribution may fail to create if the standard deviation is negative.