sage.data.waveform.distributions.uniform

Filename : uniform.py Description : Short description of the file

Created on 2026-02-16 10:38:20

__author__ = Narenraju Nagarajan __copyright__ = Copyright 2026, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]

GitHub Repository: NULL

Documentation: NULL

Classes

Uniform

Uniform distribution sampler over [low, high].

Module Contents

class Uniform(low, high)[source]

Uniform distribution sampler over [low, high].

GPU-friendly and generator-aware: passes the optional torch.Generator through to torch.rand() for reproducible sampling. Used by DistributionSampler as the "uniform" prior type.

Parameters:
  • low (float) – Lower bound of the uniform distribution.

  • high (float) – Upper bound of the uniform distribution.

low[source]
scale[source]
sample(shape, device=None, dtype=torch.float32, generator=None)[source]

Draw samples from the uniform distribution.

Parameters:
Returns:

Samples uniformly distributed in [low, high].

Return type:

torch.Tensor