horvatha / cxnet Goto Github PK
View Code? Open in Web Editor NEWAid for learning complex networks. Based on igraph.
Aid for learning complex networks. Based on igraph.
Network.cxcolorize raise KeyError is it runs on a component.
In [1]: import cxnet
In [2]: net = cxnet.debnetwork()
Getting package names and dependencies.
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Transforming to numbered graph.
Transforming to igraph.
Setting vertex types.
In [3]: cc = net.components(mode='str')
In [4]: sccs = [c for c, s in zip(cc.subgraphs(), cc.sizes()) if s >1]
In [5]: s = sccs[0]
KeyError Traceback (most recent call last)
in ()
----> 1 s.cxcolorize()
/home/ha/.local/lib/python3.7/site-packages/cxnet/debnetworki.py in cxcolorize(self, vcolors, ecolors)
219 assert isinstance(ecolors[i], str),
220 "The ecolors parameter should contain three color names as string"
--> 221 self.normalize()
222 if "type" in self.vs.attributes():
223 for vertex in self.vs:
/home/ha/.local/lib/python3.7/site-packages/cxnet/debnetworki.py in normalize(self)
192 self["revision"] = int(revision)
193
--> 194 del self.vs["id"]
195 integer_attributes = (
196 ("type", self.vs),
KeyError: 'id'
The network stores the bazaar revision if it exists. As cxnet uses git instead of bazaar now, that should be deleted or replaced with the git commit id.
See the 'revision' graph attribute (net['revision']).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.