neurosynth/base/mask.py
def remove(self, layers):
        """ Remove one or more layers from the stack of masking layers.
        Args:
            layers: An int, string or list of strings and/or ints. Ints are
                interpreted as indices in the stack to remove; strings are
                interpreted as names of layers to remove. Negative ints will
                also work--i.e., remove(-1) will drop the last layer added.
        """
        if not isinstance(layers, list):
            layers = [layers]
        for l in layers:
            if isinstance(l, string_types):
                if l not in self.layers:
                    raise ValueError("There's no image/layer named '%s' in "
                                     "the masking stack!" % l)
                self.stack.remove(l)
            else:
                l = self.stack.pop(l)
            del self.layers[l]

        self.set_mask()
def remove(self, layers):
        """ Remove one or more layers from the stack of masking layers.
        Args:
            layers: An int, string or list of strings and/or ints. Ints are
                interpreted as indices in the stack to remove; strings are
                interpreted as names of layers to remove. Negative ints will
                also work--i.e., remove(-1) will drop the last layer added.
        """
        if not isinstance(layers, list):
            layers = [layers]
        for l in layers:
            if isinstance(l, string_types):
                if l not in self.layers:
                    raise ValueError("There's no image/layer named '%s' in "
                                     "the masking stack!" % l)
                self.stack.remove(l)
            else:
                l = self.stack.pop(l)
            del self.layers[l]

        self.set_mask()
Remove one or more layers from the stack of masking layers.
        Args:
            layers: An int, string or list of strings and/or ints. Ints are
                interpreted as indices in the stack to remove; strings are
                interpreted as names of layers to remove. Negative ints will
                also work--i.e., remove(-1) will drop the last layer added.