toScalars method

Iterable<double> toScalars()

Maps tensors to scalars.

Throws StateError if any tensor is not a vector of length 1.

Implementation

Iterable<double> toScalars() => map((e) => e.toScalar());