menpo/shape/pointcloud.py
def from_mask(self, mask):
        """
        A 1D boolean array with the same number of elements as the number of
        points in the PointCloud. This is then broadcast across the dimensions
        of the PointCloud and returns a new PointCloud containing only those
        points that were ``True`` in the mask.

        Parameters
        ----------
        mask : ``(n_points,)`` `ndarray`
            1D array of booleans

        Returns
        -------
        pointcloud : :map:`PointCloud`
            A new pointcloud that has been masked.

        Raises
        ------
        ValueError
            Mask must have same number of points as pointcloud.
        """
        if mask.shape[0] != self.n_points:
            raise ValueError('Mask must be a 1D boolean array of the same '
                             'number of entries as points in this PointCloud.')
        pc = self.copy()
        pc.points = pc.points[mask, :]
        return pc

        A 1D boolean array with the same number of elements as the number of
        points in the PointCloud. This is then broadcast across the dimensions
        of the PointCloud and returns a new PointCloud containing only those
        points that were ``True`` in the mask.

        Parameters
        ----------
        mask : ``(n_points,)`` `ndarray`
            1D array of booleans

        Returns
        -------
        pointcloud : :map:`PointCloud`
            A new pointcloud that has been masked.

        Raises
        ------
        ValueError
            Mask must have same number of points as pointcloud.
        
A 1D boolean array with the same number of elements as the number of
points in the PointCloud. This is then broadcast across the dimensions
of the PointCloud and returns a new PointCloud containing only those
points that were ``True`` in the mask.

Parameters



Returns

pointcloud : :map:`PointCloud`
A new pointcloud that has been masked.

Raises

ValueError
Mask must have same number of points as pointcloud.
A 1D boolean array with the same number of elements as the number of points in the PointCloud . This is then broadcast across the dimensions of the PointCloud and returns a new PointCloud containing only those points that were ` ` True ` ` in the mask . Parameters Returns pointcloud : : map : ` PointCloud ` A new pointcloud that has been masked . Raises ValueError Mask must have same number of points as pointcloud .
def from_mask(self, mask):
        if mask.shape[0] != self.n_points:
            raise ValueError('Mask must be a 1D boolean array of the same '
                             'number of entries as points in this PointCloud.')
        pc = self.copy()
        pc.points = pc.points[mask, :]
        return pc
def from_mask ( self , mask ) : if mask . shape [ 0 ] != self . n_points : raise ValueError ( 'Mask must be a 1D boolean array of the same ' 'number of entries as points in this PointCloud.' ) pc = self . copy ( ) pc . points = pc . points [ mask , : ] return pc
A 1D boolean array with the same number of elements as the number of
points in the PointCloud.
A 1D boolean array with the same number of elements as the number of points in the PointCloud .
"""
        A 1D boolean array with the same number of elements as the number of
        points in the PointCloud. This is then broadcast across the dimensions
        of the PointCloud and returns a new PointCloud containing only those
        points that were ``True`` in the mask.

        Parameters
        ----------
        mask : ``(n_points,)`` `ndarray`
            1D array of booleans

        Returns
        -------
        pointcloud : :map:`PointCloud`
            A new pointcloud that has been masked.

        Raises
        ------
        ValueError
            Mask must have same number of points as pointcloud.
        """
self
mask