toList method

dynamic toList()

Convert to a nested Dart list.

Implementation

dynamic toList() {
  if (ndim == 1) {
    return List<double>.from(data);
  }
  return List.generate(shape[0], (i) => this[i].toList());
}