vec3_to_np_array#
- akkits.utils.flatbuffer.vec3_to_np_array(obj, dtype=<class 'numpy.float32'>)#
Creates a NumPy array from a flatbuffer Vector3 struct with fields: X, Y, Z.
All X, Y, Z should be an int or a float.
- Parameters
obj (Optional[Vector3]) – A Vector3 object. Can be None.
dtype (_type_, optional) – The output array data type. Defaults to np.float32.
- Returns
arr (Optional[np.ndarray]) – The Vector3 as an array. If input is None, then returns None.