[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Python Interface to igraph
From: |
Lorenzo Isella |
Subject: |
[igraph] Python Interface to igraph |
Date: |
Thu, 7 Feb 2008 15:16:55 +0100 |
Dear All,
I am not very experienced with Python and software in general.
I run Debian testing on my desktop (the amd64 release since I have a
dual-core Intel Xeon).
I installed igraph for R some time ago and was using it in a Python
code by calling it using Rpy.
Now, I have found out that there is a Python interface, so it does not
make any sense to invoke it from R.
Furthermore, I suspect that calling it via Rpy makes it a lot slower,
so I downloaded the igraph package for Python from
http://pypi.python.org/pypi/igraph .
After unpacking it, I ran
python setup.py build_py
followed by
python setup.py install_lib
(1) Is this the correct way of proceeding? I would guess so, since
Python recognizes the library as being installed, but I would like to
be told so by someone acknowledgeable.
(2)Say that at some point a version 0.5 is release and I want to
upgrade my installation of igraph. Should I just repeat what I did at
(1)?
(3)This is a worst scenario case: once I installed some Python
software in a similar way and it conflicted with other modules, but
was quite complicated (for me at least) to uninstall it.
Would that be the case now? In other words: what is the procedure to
uninstall igraph if I need to?
(4)Last but not least: I am reading the documentation for the Python
version, but it is taking me a long time to translate a few commands I
use to issue under R into the corresponding Python commands.
Consider the following commands (in R) I am using when looking for the
connected components once I have the distance matrix dist_mat and I
consider two nodes to be directly connected if their distance is below
d (i.e. dist_mat<=d is the adjacency matrix)
my_g=graph.adjacency(dist_mat<=d,mode="undirected")
my_g=simplify(my_g)
nc=no.clusters(my_g)
cluster_comp=clusters(my_g)$csize
How would they translate in Python?
Sorry for the many questions, but I am quite a newbie at all this.
Many thanks
Lorenzo
- [igraph] Python Interface to igraph,
Lorenzo Isella <=