def constrain_points_to_bounds(self, points):
        r"""
        Constrains the points provided to be within the bounds of this image.

        Parameters
        ----------
        points : ``(d,)`` `ndarray`
            Points to be snapped to the image boundaries.

        Returns
        -------
        bounded_points : ``(d,)`` `ndarray`
            Points snapped to not stray outside the image edges.
        """
        bounded_points = points.copy()
        # check we don't stray under any edges
        bounded_points[bounded_points < 0] = 0
        # check we don't stray over any edges
        shape = np.array(self.shape)
        over_image = 0 < (shape - bounded_points)
        bounded_points[over_image] = shape[over_image]
        return bounded_points
dataset/ETHPy150Open menpo/menpo/menpo/image/base.py/Image.constrain_points_to_bounds/swapped operands of `<`