Random Normal

Shipping
array_random_normal

i.i.d. Gaussian samples N(mean, std) with a portable, reproducible RNG and seed output

Signature

Outputs

  • arrayArrayAn array of i.i.d. Normal(mean, std) samples; rank of the shape picks Vector / Matrix / Tensor.
  • seedScalarThe concrete seed actually used this run. With Seed = 0 (fresh entropy) it reports the drawn seed so you can pin it and reproduce the array.

Parameters

KeyTypeDefaultNotes
shapetext100Target shape as comma-separated dimensions (numpy-style): '5' → Vector, '3, 4' → Matrix, '2, 3, 4' → Tensor.
meanfloat0.0Distribution mean.
stdfloat1.0Standard deviation (≥ 0).
seedint0Reproducibility seed. 0 = a fresh random array every run (read the actual seed off the `seed` output and type it here to lock that exact array). Any non-zero value reproduces bit-for-bit on every machine.
rng_algorithmenumchacha12one of: chacha12, chacha8, chacha20, pcg64, xoshiro256++, xoshiro256**
unittextOptional physical unit, applied only to a 1-D (Vector) result.

Description

Random Normal is numpy.random.normal: i.i.d. Gaussian samples with mean μ and standard deviation σ, filling an array of the requested Shape (rank picks Vector / Matrix / Tensor).

As with Random Uniform, the RNG is portable and reproducible: a given seed + Algorithm yields the same stream on any OS/CPU. Seed draws fresh entropy and reports the used seed on the seed output so you can pin it. A negative σ is meaningless and rejected with an error (the underlying Normal::new would not catch it, so the node guards it explicitly). Use to set the noise level of a synthetic signal or the spread of a Monte-Carlo ensemble.

Mathematics

Examples

Standard normal vector

Defaults (Shape = 100, μ = 0, σ = 1) → 100 i.i.d. samples, plus the drawn seed on the seed port.

Additive measurement noise

Shape = 2048, μ = 0, σ = 0.05, Seed = 42 → a reproducible noise vector to add to a clean signal, matching a 5% (1σ) sensor error.

Applications

  • Injecting reproducible Gaussian measurement noise into a synthetic signal.
  • Random weight initialization and stochastic perturbations.
  • Monte-Carlo uncertainty propagation ensembles with a shareable seed.

Neat

The node explicitly rejects a negative σ before sampling: rand_distr 0.4's Normal::new does NOT, so a negative std would otherwise slip through as a silently mirrored distribution.

It shares the exact seed-resolution machinery with Random Uniform and the noise generator — the '0 = fresh, report the used seed' policy is one shared helper (resolve_rng), so behaviour is identical across every random source.

Known issues

σ must be non-negative and finite (as must μ); a negative σ is an error, not a mirrored distribution.

The unit is applied only to a rank-1 (Vector) result.

With Seed = 0 the array changes every run by design and the node warns that it is non-deterministic until the reported seed is pinned.

See also

arraytensorsourcerandomgaussiannormalmonte-carloreproducibleseedstateless