rethinking design of tensor.
This commit is contained in:
@ -5,6 +5,10 @@ import 'package:collection/collection.dart';
|
||||
class Tensor extends DelegatingList<DelegatingList<double>> {
|
||||
Tensor(super.base);
|
||||
|
||||
factory Tensor.fromList(List<List<double>> lst) {
|
||||
return Tensor(DelegatingList(lst.map((e) => DelegatingList(e)).toList()));
|
||||
}
|
||||
|
||||
Tensor each(Function(double, int, int) f) {
|
||||
Tensor other = Tensor([]);
|
||||
for (int j = 0; j < length; ++j) {
|
||||
|
Reference in New Issue
Block a user