fromScalarLists<S extends num> static method
Constructs TensorPairs from two lists of int or double values.
Example
import 'package:calc/calc.dart';
void main() {
final pairs = TensorPairs.fromScalars([1,2,3], [2,3,4]);
final correlation = pairs.correlation().toScalar();
}
Implementation
static TensorPairs<Tensor<double>> fromScalarLists<S extends num>(
Iterable<S> x, Iterable<S> y) {
return TensorPairs.fromTensorLists(
x.toTensors().toList(),
y.toTensors().toList(),
);
}