def from_file()

in metropolis/utils/data_classes.py [0:0]


    def from_file(cls, file_name: str) -> "LidarPointCloud":
        """Loads LIDAR data from binary numpy format. Data is stored as (x, y, z,
        intensity, ring index).

        Args:
            file_name: Path of the pointcloud file on disk.

        Returns:
            LidarPointCloud instance (x, y, z, intensity).
        """

        assert file_name.endswith(".npz"), f"Unsupported filetype {file_name}"

        with pathmgr.open(file_name, "rb") as fid:
            data = np.load(fid)
            points = data["points"]

        points4 = np.ones((points.shape[0], 4))
        points4[:, :3] = points

        return cls(points4.T)