Removes a particular unit/node from a layer.
353910
def deleteLayerNode(self, layername, nodeNum):
        
        # first, construct an array of all of the weights
        # that won't be deleted:
        gene = []
        for layer in self.layers:
            if layer.type != 'Input':
                for i in range(layer.size):
                    if layer.name == layername and i == nodeNum:
                        pass # skip it
                    else:
                        gene.append(layer.weight[i])
        for connection in self.connections:
            for i in range(connection.fromLayer.size):
                for j in range(connection.toLayer.size):
                    if ((connection.fromLayer.name == layername and i == nodeNum) or
                        (connection.toLayer.name == layername and j == nodeNum)):
                        pass # skip weights from/to nodeNum
                    else:
                        gene.append(connection.weight[i][j])
        # now, change the size (removes rightmost node):
        self.changeLayerSize(layername, self[layername].size - 1)
        # and put the good weights where they go:
        self.unArrayify(gene)
1181470
def remove_dependency_layer(self):
        
        if self.dependency_layer is not None:
            this_node = self.dependency_layer.get_node()
            self.root.remove(this_node)
            self.dependency_layer = self.my_dependency_extractor = None

        if self.header is not None:
            self.header.remove_lp('deps')
68186
public void removeNode(int n)
  {

    if (!m_mutable)
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");

    this.removeElement(n);
  }
712201
function discardLayer(item) {
  if (confirm('Remove this layer?')) {
    scene.destroyLayer(item.layer);
    layers.remove(item);
  }
}
1083381
def remove(self, ref, cb=None):
        """"""

        if self.is_api:
            return self._remove_api(ref, cb)
        else:
            return self._remove_fs(ref, cb)
376137
def remove(self):
        
        if self.parent:
            for i, node in enumerate(self.parent.children):
                if node is self:
                    self.parent.changed()
                    del self.parent.children[i]
                    self.parent = None
                    return i
1116537
def remove_term_layer(self):
        
        if self.term_layer is not None:
            this_node = self.term_layer.get_node()
            self.root.remove(this_node)
            self.term_layer = None

        if self.header is not None:
            self.header.remove_lp('terms')
130571
def discard(self, *args):
        '''
        
        '''
        return Plan(reduce(lambda m,k: m.discard(k), args, self.nodes))
783758
def removeReference(self, fromnode, tonode):
        
        if fromnode is None:
            fromnode = self
        fromident = self.getIdent(fromnode)
        toident = self.getIdent(tonode)
        if fromident is not None and toident is not None:
            while True:
                edge = self.graph.edge_by_node(fromident, toident)
                if edge is None:
                    break
                self.graph.hide_edge(edge)
542357
def remove_node(self, node):
        

        if node in self._nodes:
            yield from node.delete()
            self._nodes.remove(node)
1047673
public synchronized boolean remove(Layer layer, boolean redraw) {
        checkIsNull(layer);
        if (this.layersList.remove(layer)) {
            layer.unassign();
            if (redraw) {
                this.redrawer.redrawLayers();
            }
            return true;
        }
        return false;
    }
70480
def _remove_node(self, node):
        

        self.graph.remove_node(node)
        if node.addr in self._nodes:
            del self._nodes[node.addr]

        # We wanna remove the function as well
        if node.addr in self.kb.functions:
            del self.kb.functions[node.addr]

        if node.addr in self.kb.functions.callgraph:
            self.kb.functions.callgraph.remove_node(node.addr)
269208
def remove_text_layer(self):
        
        if self.text_layer is not None:
            this_node = self.text_layer.get_node()
            self.root.remove(this_node)
            self.text_layer = None

        if self.header is not None:
            self.header.remove_lp('text')
618546
def _remove_units(self, x):
        
        if hasattr(x, 'unit'):
            x = x.decompose(self.units).value

        else:
            x = np.array(x)

        return x
82906
def removeNode(self, node):
        
        ident = self.getIdent(node)
        if ident is not None:
            self.graph.hide_node(ident)
183911
def remove_constituency_layer(self):
        
        if self.constituency_layer is not None:
            this_node = self.constituency_layer.get_node()
            self.root.remove(this_node)
        if self.header is not None:
            self.header.remove_lp('constituents')
610793
def _remove_layer_and_reconnect(self, layer):
        
        successors = self.get_successors(layer)
        predecessors = self.get_predecessors(layer)
        # remove layer's edges
        for succ in successors:
            self._remove_edge(layer, succ)
        for pred in predecessors:
            self._remove_edge(pred, layer)

        # connect predecessors and successors
        for pred in predecessors:
            for succ in successors:
                self._add_edge(pred, succ)

        # remove layer in the data structures
        self.layer_list.remove(layer)
        self.keras_layer_map.pop(layer)

        # re-assign input and output layers if layer happens to be an
        # input / output layer
        if layer in self.input_layers:
            idx = self.input_layers.index(layer)
            self.input_layers.pop(idx)
            for pred in predecessors:
                self.input_layers.insert(idx, pred)
                idx += 1
        if layer in self.output_layers:
            idx = self.output_layers.index(layer)
            self.output_layers.pop(idx)
            for succ in successors:
                self.output_layers.insert(idx, succ)
                idx += 1