Python interface for igraph
More robust support for Matplotlib and initial support for plotly as graph plotting backends, controlled by a configuration option. See PR #425 for more details.
Added support for additional ways to construct a graph, such as from a dictionary of dictionaries, and to export a graph object back to those data structures. See PR #434 for more details.
Graph.list_triangles()
lists all triangles in a graph.
Graph.reverse_edges()
reverses some or all edges of a graph.
Graph.Degree_Sequence()
now supports the "no_multiple_uniform"
generation method, which generates simple graphs, sampled uniformly, using rejection sampling.
Graph.Lattice()
now supports per-dimension periodicity control.
Graph.get_adjacency()
now allows the user to specify whether loop edges should be counted once or twice, or not at all.
Graph.get_laplacian()
now supports left-, right- and symmetric normalization.
The C core of igraph was updated to version 0.10.0.
We now publish abi3
wheels on PyPI from CPython 3.9 onwards, making it possible to use an already-built Python wheel with newer minor Python releases (and also reducing the number of wheels we actually need to publish). Releases for CPython 3.7 and 3.8 still use version-specific wheels because the code of the C part of the extension contains conditional macros for CPython 3.7 and 3.8.
Changed default value of the use_vids=...
argument of Graph.DataFrame()
to True
, thanks to @fwitter.
Graph.Degree_Sequence()
now accepts all sorts of sequences as inputs, not only lists.
edge_color
and edge_width
to be set
on an edge-by-edge basis.Dropped support for Python 3.6.
Removed deprecated UbiGraphDrawer
.
Removed deprecated show()
method of Plot
instances as well as the feature that automatically shows the plot when plot()
is called with no target.
Removed the eids
keyword argument of get_adjacency()
.
Graph.clusters()
is now deprecated; use Graph.connected_components()
or its already existing shorter alias, Graph.components()
.
Graph.shortest_paths()
is now deprecated; use Graph.distances()
instead.
musllinux
wheels on PyPI.Graph union and intersection (by name) operators now verify that there are no duplicate names within the individual graphs.
Fixed a memory leak in Graph.union()
when edge maps were used; see #534 for details.
Fixed a bug in the Cairo and Matplotlib backends that prevented edges with labels from being drawn properly; see #535 for details.
Fixed plotting of curved edges in the Cairo plotting backend.
setup.py
now looks for igraph.pc
recursively in vendor/install
; this fixes building igraph from source in certain Linux distributions
Graph.shortest_paths()
does not crash with zero-length weight vectors any more
Fix a memory leak in Graph.delete_vertices()
and other functions that convert a list of vertex IDs internally to an igraph_vs_t
object, see #503 for details.
Fixed potential memory leaks in Graph.maximum_cardinality_search()
, Graph.get_all_simple_paths()
, Graph.get_subisomorphisms_lad()
, Graph.community_edge_betweenness()
, as well as the union
and intersection
operators.
Fix a crash that happened when subclassing Graph
and overriding __new__()
in the subclass; see #496 for more details.
Documentation now mentions that we now support graphs of size 5 or 6 for isomorphism / motif calculations if the graph is undirected
Fixed a performance bottleneck in VertexSeq.select()
and EdgeSeq.select()
for the case when the VertexSeq
or the EdgeSeq
represents the whole graph. See #494 for more details.
Edge labels now take the curvature of the edge into account, thanks to @Sriram-Pattabiraman. (#457)
🎉 python-igraph
is now simply igraph
, at least on PyPI.
❗ If you use python-igraph
in the dependencies of any of your projects, please replace it with igraph
instead. python-igraph
is now a stub package on PyPI that depends on the matching version of the Python package named igraph
. We will keep on updating python-igraph
until Sep 1, 2022, after which python-igraph
will not receive any updates.
🙏🏼 Many thanks to @patrickfuller for allowing us to useigraph
as the package name on PyPI.
Other than that, the only change in this release compared to python-igraph
0.9.7 is that the setup script does not use distutils
any more.
Added support for graph chordality which was already available in the C core: Graph.is_chordal()
, Graph.chordal_completion()
, and
Graph.maximal_cardinality_search()
. See PR #437 for more details. Thanks to @cptwunderlich for requesting this.
Graph.write()
and Graph.Read()
now accept Path
objects as well as strings. See PR #441 for more details. Thanks to @jboynyc for the implementation.
This release contains wheels for Python 3.10, and also contains experimental Python wheels for the aarch64
architecture.
Fixed the Apple Silicon wheels so they should now work out of the box on newer Macs with Apple M1 CPUs.
Fixed a bug that resulted in an unexpected error when plotting a graph with wrap_labels=True
if the size of one of the vertices was zero or negative, thanks to @jboynyc. See PR #439 for more details.
Fixed a bug that sometimes caused random crashes in Graph.Realize_Degree_Sequence()
and at other times caused weird errors in Graph.Read_Ncol()
when it received an invalid data type.
plot(g, ..., mark_groups=True)
now works with the Matplotlib plotting backend.
set_random_number_generator(None)
now correctly switches back to igraph's own random number generator instead of the default one that hooks into the random
module of Python.
Improved performance in cases when igraph has to call back to Python's random
module to generate random numbers. One example is Graph.Degree_Sequence(method="vl")
, whose performance suffered a more than 30x slowdown on 32-bit platforms before, compared to the native C implementation. Now the gap is smaller. Note that if you need performance and do not care about seeding the random number generator from Python, you can now use set_random_number_generator(None)
to switch back to igraph's own RNG that does not need a roundtrip to Python.
Added Graph.is_tree()
to test whether a graph is a tree.
Added Graph.Realize_Degree_Sequence()
to construct a graph that realizes a given degree sequence, using a deterministic (Havel-Hakimi-style) algorithm.
Added Graph.Tree_Game()
to generate random trees with uniform sampling.
Graph.to_directed()
now supports a mode=...
keyword argument.
Added a create_using=...
keyword argument to Graph.to_networkx()
to let the user specify which NetworkX class to use when converting the graph.
Improved performance of Graph.from_networkx()
and Graph.from_graph_tool()
on large graphs, thanks to @szhorvat and @iosonofabio for fixing the issue.
Fixed the autocurve=...
keyword argument of plot()
when using the Matplotlib backend.
Functions and methods that take string arguments that represent an underlying enum in the C core of igraph now print a deprecation warning when provided with a string that does not match one of the enum member names (as documented in the docstrings) exactly. Partial matches will be removed in the next minor or major version, whichever comes first.
Graph.to_directed(mutual=...)
is now deprecated, use mode=...
instead.
igraph.graph.drawing.UbiGraphDrawer
is deprecated as the upstream project is not maintained since 2008.