bartz.testing.Normal¶
- class bartz.testing.Normal[source]¶
Standard Normal distribution.
- sample(key, shape)[source]¶
Sample i.i.d. standard Normal values.
- Return type:
Float[Array, '*shape']
- quantize(x, max_bins)[source]¶
Quantize values into equal-probability bins.
- Parameters:
x (
Float[Array, '*shape']) – Values drawn from the distribution, of any shape.max_bins (
int) – The number of levels.
- Returns:
quantized_x (UInt[Array, ‘*shape’]) – The bin indices, in
[0, max_bins).m (int) – The number of levels, always
max_bins.