Changeset 8701:0e58bbbdaecf in orange


Ignore:
Timestamp:
08/14/11 14:31:55 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
f16b1df23f79195ab4471d6115025487af86c589
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/network/network.py

    r8378 r8701  
    202202    def subgraph(self, nbunch): 
    203203        G = nx.Graph.subgraph(self, nbunch) 
    204         nodes = set(nbunch).intersection(self.nodes()) 
     204        items = self.items().get_items(G.nodes()) 
     205        G = G.to_orange_network() 
     206        G.set_items(items) 
    205207         
    206208        return G 
    207         # TODO: _items, _links 
     209        # TODO: _links 
    208210     
    209211    __doc__ += _get_doc(nx.Graph.__doc__) 
Note: See TracChangeset for help on using the changeset viewer.