unpackNum method

List unpackNum(
  1. Struct s,
  2. List<int> shape
)

Reads numeric data from the buffer and constructs an n-dimensional array.

Implementation

List<dynamic> unpackNum(Struct s, List<int> shape) {
  final List<dynamic> arr = nd.ndarray(shape, s, buffer, readOffset);
  final int arrayBufferSize = nd.prod(shape);
  advance(s, arrayBufferSize);
  return arr;
}