TensorDistribution<T>.filled constructor Null safety

TensorDistribution<T>.filled(
  1. TensorShape shape,
  2. Distribution<T> distribution
)

Constructing a distribution where all indices have identical scalar distribution.

Implementation

factory TensorDistribution.filled(
  TensorShape shape,
  Distribution<T> distribution,
) {
  return TensorDistribution<T>.generate(
    shape,
    (shape, i) => distribution,
  );
}