filled method Null safety

Tensor<double> filled(
  1. TensorShape shape,
  2. [double value = 0.0]
)

Implementation

static Tensor<double> filled(TensorShape shape, [double value = 0.0]) {
  final builder = Float32TensorBuilder();
  builder.tensorShape = shape;
  final data = builder.elements;
  data.fillRange(0, data.length, value);
  return builder.build();
}