bytesToVector static method

List<double> bytesToVector(
  1. Uint8List bytes,
  2. int dim
)

Implementation

static List<double> bytesToVector(Uint8List bytes, int dim) {
  final bd = ByteData.sublistView(bytes);
  final out = List<double>.filled(dim, 0.0);
  for (int i = 0; i < dim; i++) out[i] = bd.getFloat32(i * 4, Endian.little);
  return out;
}