

def __setitem__(self, group, value):
    '\n        Sets a new landmark group for the given label. This can be set using\n        an existing landmark group, or using a PointCloud. Existing landmark\n        groups will have their target reset. If a PointCloud is provided then\n        all landmarks belong to a single label `all`.\n\n        Parameters\n        ----------\n        group : `string`\n            Label of new group.\n\n        value : :map:`LandmarkGroup` or :map:`PointCloud`\n            The new landmark group to set.\n\n        Raises\n        ------\n        DimensionalityError\n            If the landmarks and the shape are not of the same dimensionality.\n        '
    if (group is None):
        raise ValueError('Cannot set using the key `None`. `None` has a reserved meaning for landmark groups.')
    from menpo.shape import PointCloud
    n_dims = self.n_dims
    if ((n_dims is not None) and (value.n_dims != n_dims)):
        raise ValueError('Trying to set {}D landmarks on a {}D LandmarkManager'.format(group.n_dims, self.n_dims))
    if isinstance(value, PointCloud):
        lmark_group = LandmarkGroup(value, OrderedDict([('all', np.ones(value.n_points, dtype=np.bool))]))
    elif isinstance(value, LandmarkGroup):
        lmark_group = value.copy()
        lmark_group._group_label = group
    else:
        raise ValueError('Valid types are PointCloud or LandmarkGroup')
    self._landmark_groups[group] = lmark_group

dataset/ETHPy150Open menpo/menpo/menpo/landmark/base.py LandmarkManager.__setitem__/VarMisuse@72/366 `value`->`group`