Up to date
This page is up to date for NumDot stable.
If you still find outdated information, please open an issue.
NDRandomGenerator๏
Inherits: RefCounted
An object for generating random values.
Description๏
An object for generating random values. Given a specific seed, it is perfectly deterministic.
Create instances through nd.default_rng().
Methods๏
integers(low_or_high: |
|
random(shape: |
|
Array[NDRandomGenerator] |
spawn(n: |
Method Descriptions๏
NDArray integers(low_or_high: int = 0, high: Variant = null, shape: Variant = PackedByteArray(), dtype: DType = 8, endpoint: bool = false) ๐
Return random integers sampled from the โdiscrete uniformโ distribution of the specified dtype. If high is None (the default), then results are from 0 to low.
NDArray randn(shape: Variant = PackedByteArray(), dtype: DType = 2) ๐
Return random integers sampled from the standard normal distribution N(0, 1) of the specified dtype. A general gaussian distribution N(mu, sig) may be obtained by multiplying the result with sig and adding it with mu.
NDArray random(shape: Variant = PackedByteArray(), dtype: DType = 2) ๐
Return random floats in the half-open interval [0.0, 1.0).
Array[NDRandomGenerator] spawn(n: int) ๐
Create new independent child generators.