def check_point(point):
        """Validates a 2-d point with an intensity.

        Parameters
        ----------
        point : array_like
            (x, y, [intensity])
            Coordinates of the point to add. If optional `intensity` is not
            supplied, it will be set to `None`.

        Returns
        -------
        point : :obj:tuple of :obj:float
            The same point converted to floats, assuming no errors were raised.

        """
        if len(point) != 2:
            intensity = point[-1]
            point = point[:-1]
        else:
            intensity = None
        if len(point) != 2:
            raise ValueError("Coordinates must be two-dimensional.")
        try:
            point = tuple([float(p) for p in point])  # Convert everything to floats.
        except ValueError:
            raise ValueError("Coordinates must be convertible to floats.")
        return point + tuple((intensity,))