I have a flatbuffer structure which holds some binary data. A simple example illustrating this shown below:
table NDArray {
name:string;
dataType:DType;
pData:[ubyte];
}
The data in pData might actually be an array of int32 or some other type and I want to feed this data into the numpy-function fromstring() to get that array without having to read every byte individually. E.g.:
my_array = numpy.fromstring(fb_raw_data, dtype=numpy.int32)
Is this possible?
I have a flatbuffer structure which holds some binary data. A simple example illustrating this shown below:
The data in
pDatamight actually be an array ofint32or some other type and I want to feed this data into thenumpy-functionfromstring()to get that array without having to read every byte individually. E.g.:Is this possible?