You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the official documentation, numpy.fromfile assumes platform-dependent binary format, and hence, it should not be used to transfer data from machines with different architectures.
defload_velo_scan(file):
"""Load and parse a velodyne binary file."""scan=np.fromfile(file, dtype=np.float32)
returnscan.reshape((-1, 4))
I am concerned about using the function to load data from the velodyne bin files provided by KITTI. Is this approach guaranteed to work regardless of the CPU architecture on which the code is being run?
The text was updated successfully, but these errors were encountered:
I'm not sure how np.fromfile() works on big-endian machines, but I agree, it would not hurt to use dtype='<f4' to set the data type explicitly to little-endian single-precision float.
According to the official documentation,
numpy.fromfile
assumes platform-dependent binary format, and hence, it should not be used to transfer data from machines with different architectures.The
load_velo_scan
is currently defined as:I am concerned about using the function to load data from the velodyne bin files provided by KITTI. Is this approach guaranteed to work regardless of the CPU architecture on which the code is being run?
The text was updated successfully, but these errors were encountered: