asFlattenedList property

List<double> asFlattenedList

Returns a representation of the matrix as a flattened list:

import 'package:ml_linalg/matrix.dart';

void main() {
  final matrix = Matrix.fromList([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
  ]);

  print(matrix.asFlattenedList); // [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
}

Runtime type can be Float32List or Float64List, it depends on the dtype

Implementation

List<double> get asFlattenedList;