paleo/graph.py
def _create_topology_order(self):
        """
        Expand the network to a plain list.
        The list is in topology order.
        """
        logger.debug('Creating topological order of layers '
                     'based on the nested list representation.')

        def flatten(layer):
            if isinstance(layer, (tuple, list)):
                _layer_list = []
                for l in layer:
                    _layer_list.extend(flatten(l))
                return _layer_list
            else:
                return [layer]

        if self._topological_order is None:
            self._topological_order = []
            for layer in self.nested_list:
                self._topological_order.extend(flatten(layer))

        Expand the network to a plain list.
        The list is in topology order.
        
Expand the network to a plain list.
The list is in topology order.
Expand the network to a plain list . The list is in topology order .
def _create_topology_order(self):
        logger.debug('Creating topological order of layers '
                     'based on the nested list representation.')
        def flatten(layer):
            if isinstance(layer, (tuple, list)):
                _layer_list = []
                for l in layer:
                    _layer_list.extend(flatten(l))
                return _layer_list
            else:
                return [layer]
        if self._topological_order is None:
            self._topological_order = []
            for layer in self.nested_list:
                self._topological_order.extend(flatten(layer))
def _create_topology_order ( self ) : logger . debug ( 'Creating topological order of layers ' 'based on the nested list representation.' ) def flatten ( layer ) : if isinstance ( layer , ( tuple , list ) ) : _layer_list = [ ] for l in layer : _layer_list . extend ( flatten ( l ) ) return _layer_list else : return [ layer ] if self . _topological_order is None : self . _topological_order = [ ] for layer in self . nested_list : self . _topological_order . extend ( flatten ( layer ) )
Expand the network to a plain list.
Expand the network to a plain list .
"""
        Expand the network to a plain list.
        The list is in topology order.
        """
self