table_to_np_array#

akkits.utils.flatbuffer.table_to_np_array(obj)#

Creates a NumPy array from a flatbuffer Table with fields: shape, data.

shape should be a vector of ints. data should be a vector of ints or floats.

Parameters

obj (Any) – A Table object with methods DataAsNumpy and ShapeAsNumpy. Can be None.

Returns

arr (Optional[np.ndarray]) – The Table as an array. If input is None, then returns None.