instance_id stringlengths 10 57 | file_changes listlengths 1 15 | repo stringlengths 7 53 | base_commit stringlengths 40 40 | problem_statement stringlengths 11 52.5k | patch stringlengths 251 7.06M |
|---|---|---|---|---|---|
networkx__networkx-2136 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/readwrite/gml.py:parse_gml_lines"
],
"edited_modules": [
"networkx/readwrite/gml.py:parse_gml_lines"
]
},
"file": "networkx/readwrite/gml.py"
},
{
"cha... | networkx/networkx | 5aefafab2f05b97b150c6bf681c21ba6465c8d10 | relabel_nodes adds a graph attribute when copy=True
I would have expected the following to work:
```
import networkx as nx
graph_a = nx.DiGraph()
graph_b = nx.relabel_nodes(graph_a, {}, copy=True)
print "graph_a.graph", graph_a.graph
print "graph_b.graph", graph_b.graph
assert graph_a.graph == graph_b.graph
`... | diff --git a/networkx/readwrite/gml.py b/networkx/readwrite/gml.py
index b6ab5e9eb..af8db1d00 100644
--- a/networkx/readwrite/gml.py
+++ b/networkx/readwrite/gml.py
@@ -435,10 +435,6 @@ def parse_gml_lines(lines, label, destringizer):
if label != 'id':
G = nx.relabel_nodes(G, mapping)
- if 'name'... |
networkx__networkx-2150 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/centrality/eigenvector.py:eigenvector_centrality"
],
"edited_modules": [
"networkx/algorithms/centrality/eigenvector.py:eigenvector_centrality"
]
},
... | networkx/networkx | df730d96d6490079a6b6fcf3a2bea64324aef02e | Multigraph key simplification?
It seems that the way we handle multigraph edge keys is sometimes hard to maintain (see #2107 but true elsewhere too). Is there a way to handle it more simply?
Some thoughts include:
- defaulting to ```key=None``` for all add_edge actions. The first ```G.add_edge(1,2)``` gives ```(1... | diff --git a/doc/source/reference/classes.multidigraph.rst b/doc/source/reference/classes.multidigraph.rst
index ab613964a..ef34f4664 100644
--- a/doc/source/reference/classes.multidigraph.rst
+++ b/doc/source/reference/classes.multidigraph.rst
@@ -28,6 +28,7 @@ Adding and Removing Nodes and Edges
MultiDiGraph.add_... |
networkx__networkx-2335 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/components/biconnected.py:articulation_points"
],
"edited_modules": [
"networkx/algorithms/components/biconnected.py:articulation_points"
]
},
"file... | networkx/networkx | 3efa5c5ace935ae83cea3583fbc6c3b442d4dd9b | Personalization in PageRank
In https://github.com/networkx/networkx/blob/master/networkx/algorithms/link_analysis/pagerank_alg.py in all algorithms, the personalization dict accepted needs a value for every node. In my personal application, most values are 0. I suspect that in a lot of applications, including the defau... | diff --git a/networkx/algorithms/components/biconnected.py b/networkx/algorithms/components/biconnected.py
index 3cc4d0b5c..9605d2515 100644
--- a/networkx/algorithms/components/biconnected.py
+++ b/networkx/algorithms/components/biconnected.py
@@ -351,7 +351,7 @@ def biconnected_component_subgraphs(G, copy=True):
@... |
networkx__networkx-2375 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "networkx/algorithms/bipartite/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | networkx/networkx | 2111408257dc7a5da56d26a7db95a36fff31fe4d | Issues calculating max independent set
`Python 2.7.11`
`networkx 1.11`
I have the following directed acyclic graph:

I wanted to calculate the max independent set of the transitive closure of this DAG (the nod... | diff --git a/networkx/algorithms/bipartite/__init__.py b/networkx/algorithms/bipartite/__init__.py
index f33c1d31a..7db5a174e 100644
--- a/networkx/algorithms/bipartite/__init__.py
+++ b/networkx/algorithms/bipartite/__init__.py
@@ -32,42 +32,21 @@ algorithm:
True
>>> bottom_nodes, top_nodes = bipartite.sets(B)
-li... |
networkx__networkx-2386 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/bipartite/matching.py:_is_connected_by_alternating_path",
"networkx/algorithms/bipartite/matching.py:_connected_by_alternating_paths"
],
"edited_modules": [
... | networkx/networkx | 464bf8fc08ffa09cfd0183fb5cae1adfe6839e12 | bipartite.to_vertex_cover() gives incorrect results
This program:
```python
import networkx as nx
print('Using version ' + nx.__version__)
G = nx.Graph([(0, 3), (1, 3), (1, 4), (2, 3)])
print('Edges: ' + repr(list(G.edges())))
assert nx.is_bipartite(G)
assert nx.is_connected(G)
matching = nx.bipartite.maxim... | diff --git a/networkx/algorithms/bipartite/matching.py b/networkx/algorithms/bipartite/matching.py
index 85f40a6eb..20a26f222 100644
--- a/networkx/algorithms/bipartite/matching.py
+++ b/networkx/algorithms/bipartite/matching.py
@@ -300,7 +300,8 @@ def eppstein_matching(G, top_nodes=None):
recurse(v)
-... |
networkx__networkx-2473 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/cycles.py:cycle_basis",
"networkx/algorithms/cycles.py:simple_cycles",
"networkx/algorithms/cycles.py:recursive_simple_cycles",
"networkx/algorithms/cycles.py... | networkx/networkx | 90c1645ef6dd4f80a8a09fb4ec597d99ab57f1de | find_cycle() doesn't find cycle in cyclic digraph
```python
print("version: {}".format(nx.__version__))
dg = nx.DiGraph()
dg.add_edge(1, 0)
dg.add_edge(2, 0)
dg.add_edge(1, 2)
dg.add_edge(2, 1)
find_cycle(dg)
```
```
version: 1.11
Traceback (most recent call last):
File "<ipython-input-127-ea87764febb... | diff --git a/networkx/algorithms/cycles.py b/networkx/algorithms/cycles.py
index a82665e10..77d2c4e87 100644
--- a/networkx/algorithms/cycles.py
+++ b/networkx/algorithms/cycles.py
@@ -1,14 +1,18 @@
-"""
-========================
-Cycle finding algorithms
-========================
-"""
# Copyright (C) 2010-2012 by
... |
networkx__networkx-2488 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/classes/digraph.py:DiGraph.reverse"
],
"edited_modules": [
"networkx/classes/digraph.py:DiGraph"
]
},
"file": "networkx/classes/digraph.py"
},
{
"chang... | networkx/networkx | 22a6ebaf0c235a825195e48558f39b65c26d5a1c | _relabel_copy and OrderedGraph
The current behavior of `_relabel_copy()` is somewhat unintuitive for OrderedGraphs, where the nodes in the newly created graph are ordered according to the edge iterator of the original graph, not the node iterator. I think this would be fixed by placing `H.add_nodes_from(mapping.get(n, ... | diff --git a/networkx/classes/digraph.py b/networkx/classes/digraph.py
index 73a59c30c..2c84b9d35 100644
--- a/networkx/classes/digraph.py
+++ b/networkx/classes/digraph.py
@@ -1124,7 +1124,8 @@ class DiGraph(Graph):
H.add_edges_from((v, u, deepcopy(d)) for u, v, d
in self.edg... |
networkx__networkx-2532 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/mis.py:maximal_independent_set"
],
"edited_modules": [
"networkx/algorithms/mis.py:maximal_independent_set"
]
},
"file": "networkx/algorithms/mis.py... | networkx/networkx | f1601955df3e0e9c221cfb0460b761d1d00a2eca | maximal_independent_set does not work for DiGraph
Currently [maximal_independent_set](https://github.com/networkx/networkx/blob/d7d906e1d16ef331da0bc1d149953e7532155acc/networkx/algorithms/mis.py#L70) returns the wrong results for a `DiGraph` because it uses the `G.neighbors` method which returns only the successor nod... | diff --git a/networkx/algorithms/mis.py b/networkx/algorithms/mis.py
index 4b6aab9b6..ad48a5379 100644
--- a/networkx/algorithms/mis.py
+++ b/networkx/algorithms/mis.py
@@ -1,24 +1,26 @@
# -*- coding: utf-8 -*-
# $Id: maximalIndependentSet.py 576 2011-03-01 05:50:34Z lleeoo $
-"""
-Algorithm to find a maximal (not ma... |
networkx__networkx-2566 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/tree/mst.py:boruvka_mst_edges",
"networkx/algorithms/tree/mst.py:kruskal_mst_edges",
"networkx/algorithms/tree/mst.py:prim_mst_edges",
"networkx/algorithms/tr... | networkx/networkx | ea4db3e5dc6b962c72f61060d18a2af3c9977e34 | nan values in minimum_spanning_tree
When calculating the minimum_spanning_tree, the algorithm does not correct for (or at least warn about) edges with nan weight. This can give very strange results, such as a few nodes with very high degree, 'or introduce more subtle bugs.
Simple MWE:
``` python
import networkx, mat... | diff --git a/networkx/algorithms/tree/mst.py b/networkx/algorithms/tree/mst.py
index a144e1f2e..409e56069 100644
--- a/networkx/algorithms/tree/mst.py
+++ b/networkx/algorithms/tree/mst.py
@@ -11,7 +11,9 @@ Algorithms for calculating min/max spanning trees/forests.
"""
from heapq import heappop, heappush
+from oper... |
networkx__networkx-2610 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "networkx/classes/coreviews.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networ... | networkx/networkx | d47fe57f99dd07f5bb45ab5890e71f5fb2db5c3a | Add more tests for views | diff --git a/networkx/classes/coreviews.py b/networkx/classes/coreviews.py
index 3d5994b03..95fe61ee5 100644
--- a/networkx/classes/coreviews.py
+++ b/networkx/classes/coreviews.py
@@ -10,8 +10,7 @@
# Dan Schult(dschult@colgate.edu)
"""
"""
-from itertools import chain
-from collections import Mapping, Set,... |
networkx__networkx-2618 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/centrality/harmonic.py:harmonic_centrality"
],
"edited_modules": [
"networkx/algorithms/centrality/harmonic.py:harmonic_centrality"
]
},
"file": "ne... | networkx/networkx | 3f4fd85765bf2d88188cfd4c84d0707152e6cd1e | `networkx.version` shadows any other module named `version` if imported first
Steps to reproduce:
```
$ pip freeze | grep networkx
networkx==1.11
$ touch version.py
$ python -c 'import version; print(version)'
<module 'version' from '/Users/ben/scratch/version.py'>
$ python -c 'import networkx; import version;... | diff --git a/doc/release/migration_guide_from_1.x_to_2.0.rst b/doc/release/migration_guide_from_1.x_to_2.0.rst
index d403fcb15..087605643 100644
--- a/doc/release/migration_guide_from_1.x_to_2.0.rst
+++ b/doc/release/migration_guide_from_1.x_to_2.0.rst
@@ -10,12 +10,37 @@ We have made some major changes to the methods ... |
networkx__networkx-2713 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/community/quality.py:inter_community_edges"
],
"edited_modules": [
"networkx/algorithms/community/quality.py:inter_community_edges"
]
},
"file": "ne... | networkx/networkx | 9f6c9cd6a561d41192bc29f14fd9bc16bcaad919 | inter_community_non_edges ignore directionality
Hi,
I think the function:
nx.algorithms.community.quality.inter_community_non_edges()
does not work properly for directed graph. It always return the non-edge of a undirected graph, basically halving the number of edges. This mean that the performance function (n... | diff --git a/networkx/algorithms/community/quality.py b/networkx/algorithms/community/quality.py
index 7de690af7..e04ff260d 100644
--- a/networkx/algorithms/community/quality.py
+++ b/networkx/algorithms/community/quality.py
@@ -114,7 +114,10 @@ def inter_community_edges(G, partition):
# ... |
networkx__networkx-2773 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/generators/degree_seq.py:expected_degree_graph"
],
"edited_modules": [
"networkx/generators/degree_seq.py:expected_degree_graph"
]
},
"file": "networkx/generat... | networkx/networkx | 3d7ea0d690e59c2d5d223528ea9e21b21fb7f8a4 | node-mapping bug expected_degree_graph
Hi I used the NX1 expected_degree_graph generator. It has the same interface as the NX2.
https://networkx.github.io/documentation/stable/reference/generated/networkx.generators.degree_seq.expected_degree_graph.html#networkx.generators.degree_seq.expected_degree_graph
But NX2... | diff --git a/networkx/generators/degree_seq.py b/networkx/generators/degree_seq.py
index 6d57bcf05..c42faebc7 100644
--- a/networkx/generators/degree_seq.py
+++ b/networkx/generators/degree_seq.py
@@ -426,7 +426,7 @@ def expected_degree_graph(w, seed=None, selfloops=True):
# weights dictates the order of the (inte... |
networkx__networkx-2774 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/covering.py:min_edge_cover"
],
"edited_modules": [
"networkx/algorithms/covering.py:min_edge_cover"
]
},
"file": "networkx/algorithms/covering.py"
... | networkx/networkx | 18c2fa79edbd578bea3e7a1935502f54c58385d7 | maximal_matching and max_weight_matching have different return types
The former returns a set of edges, the latter a dictionary. Should these return the same type of object?
| diff --git a/networkx/algorithms/covering.py b/networkx/algorithms/covering.py
index a70a8db4c..43c5124c2 100644
--- a/networkx/algorithms/covering.py
+++ b/networkx/algorithms/covering.py
@@ -72,9 +72,12 @@ def min_edge_cover(G, matching_algorithm=None):
maxcardinality=True)
... |
networkx__networkx-2816 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/classes/reportviews.py:OutMultiEdgeDataView.__len__",
"networkx/classes/reportviews.py:MultiEdgeDataView.__len__",
"networkx/classes/reportviews.py:EdgeView.__len__",
"n... | networkx/networkx | b271d45e1329ef65d888366c595c010070abe035 | len(G.edges) unexpected values
I'm not sure if this is a bug or expected behavior but it's at least confusing. This is using 2.0 nx.Graph() - I would provide the data to recreate, but it's private and I'm not sure why this is occurring, which might just be my lack of knowledge
```
>>> len(G.edges())
300
>>> G.numb... | diff --git a/networkx/classes/reportviews.py b/networkx/classes/reportviews.py
index ac5255f2f..6fe61f28f 100644
--- a/networkx/classes/reportviews.py
+++ b/networkx/classes/reportviews.py
@@ -791,8 +791,7 @@ class OutMultiEdgeDataView(OutEdgeDataView):
if data in dd else (n, nbr, default)
... |
networkx__networkx-2819 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/components/attracting.py:number_attracting_components",
"networkx/algorithms/components/attracting.py:is_attracting_component",
"networkx/algorithms/components/attrac... | networkx/networkx | 51aebc8fb7faf1f644bac72513352941a6e7f895 | Refactor components API
Following from the discussion on #1404, it would be good to remove the `[bi]connected_component_subgraphs` functions and make `[bi]connected_components` yield subgraphs (now they yield sets of nodes).
We decided to not make this change right now, on the one hand, in order to not overwhelm users... | diff --git a/networkx/algorithms/components/attracting.py b/networkx/algorithms/components/attracting.py
index c1abc4822..e0861f63c 100644
--- a/networkx/algorithms/components/attracting.py
+++ b/networkx/algorithms/components/attracting.py
@@ -8,6 +8,7 @@
#
# Authors: Christopher Ellison
"""Attracting components.""... |
networkx__networkx-3347 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/classes/multigraph.py:MultiGraph.add_edges_from"
],
"edited_modules": [
"networkx/classes/multigraph.py:MultiGraph"
]
},
"file": "networkx/classes/multigraph.p... | networkx/networkx | 19cd86c254ebf4a889fddc171ba166187fb72890 | Missing edge label attribute in GEXFWriter
According to the [GEXF specification ](https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf):
> Each edge can have a optional XML-attribute label, which is a string.
The [specification 1.2draft](https://github.com/gephi/gexf/blob/81ba4e7ccdc25631f836fc5caa4ed64ba53003... | diff --git a/networkx/classes/multigraph.py b/networkx/classes/multigraph.py
index d3685b14c..fd939f559 100644
--- a/networkx/classes/multigraph.py
+++ b/networkx/classes/multigraph.py
@@ -520,10 +520,10 @@ class MultiGraph(Graph):
ddd.update(attr)
try:
ddd.update(dd)
- ... |
networkx__networkx-3822 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/generators/random_graphs.py:random_lobster"
],
"edited_modules": [
"networkx/generators/random_graphs.py:random_lobster"
]
},
"file": "networkx/generators/rand... | networkx/networkx | a4d024c54f06d17d2f9ab26595a0b20ed6858f5c | Wrong random_lobster implementation?
Hi, it seems that [networkx.random_lobster's implementation logic](https://github.com/networkx/networkx/blob/4e9771f04192e94a5cbdd71249a983d124a56593/networkx/generators/random_graphs.py#L1009) is not aligned with the common definition as given in [wolfram mathworld](http://mathworl... | diff --git a/networkx/generators/random_graphs.py b/networkx/generators/random_graphs.py
index e4f2c569d..745f64e4d 100644
--- a/networkx/generators/random_graphs.py
+++ b/networkx/generators/random_graphs.py
@@ -1000,6 +1000,11 @@ def random_lobster(n, p1, p2, seed=None):
leaf nodes. A caterpillar is a tree that ... |
networkx__networkx-3848 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/connectivity/cuts.py:minimum_st_node_cut"
],
"edited_modules": [
"networkx/algorithms/connectivity/cuts.py:minimum_st_node_cut"
]
},
"file": "networ... | networkx/networkx | 3f4f9c3379a5d70fc58852154aab7b1051ff96d6 | `minimum_st_node_cut` returns empty list instead of set for adjacent nodes
https://github.com/networkx/networkx/blob/3f4f9c3379a5d70fc58852154aab7b1051ff96d6/networkx/algorithms/connectivity/cuts.py#L284
Should read `return {}`. Was questioning my sanity for a bit there 😉 | diff --git a/networkx/algorithms/connectivity/cuts.py b/networkx/algorithms/connectivity/cuts.py
index 846cd4729..dd59e3db9 100644
--- a/networkx/algorithms/connectivity/cuts.py
+++ b/networkx/algorithms/connectivity/cuts.py
@@ -281,7 +281,7 @@ def minimum_st_node_cut(G, s, t, flow_func=None, auxiliary=None, residual=N... |
networkx__networkx-4066 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/relabel.py:_relabel_inplace",
"networkx/relabel.py:_relabel_copy"
],
"edited_modules": [
"networkx/relabel.py:_relabel_inplace",
"networkx/relabel.py:_relabe... | networkx/networkx | 5638e1ff3d01e21c7d950615a699eb1f99987b8d | relabel_nodes on MultiGraphs does not preserve both edges when two nodes are replaced by one
When the graph contains edges (0,1) and (0,2), and I relabel both 1 and 2 to 3, I expected two edges from (0,3) but only one node is preserved.
Multi*Graph supports parallel edges between nodes and I expected it to preserve ... | diff --git a/networkx/relabel.py b/networkx/relabel.py
index 737b5af3d..26f50d241 100644
--- a/networkx/relabel.py
+++ b/networkx/relabel.py
@@ -13,7 +13,7 @@ def relabel_nodes(G, mapping, copy=True):
mapping : dictionary
A dictionary with the old labels as keys and new labels as values.
- A partia... |
networkx__networkx-4125 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/readwrite/edgelist.py:parse_edgelist"
],
"edited_modules": [
"networkx/readwrite/edgelist.py:parse_edgelist"
]
},
"file": "networkx/readwrite/edgelist.py"
}
... | networkx/networkx | ab7429c62806f1242c36fb81c1b1d801b4cca7a3 | Parse edgelist bug
When calling `parse_edgelist()` using comma delimiters, it will fail to parse correctly fro edges with multiple attributes.
Ex. of bad edge:
`1,2,{'test':1, 'test_other':2}`
`parse_edgelist()` will recognize the comma in the braces as delimiter and try to split them up. | diff --git a/networkx/readwrite/edgelist.py b/networkx/readwrite/edgelist.py
index 72afe1a7c..5183071d1 100644
--- a/networkx/readwrite/edgelist.py
+++ b/networkx/readwrite/edgelist.py
@@ -270,7 +270,11 @@ def parse_edgelist(
elif data is True:
# no edge types specified
try: # try to... |
networkx__networkx-4160 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/approximation/steinertree.py:steiner_tree"
],
"edited_modules": [
"networkx/algorithms/approximation/steinertree.py:steiner_tree"
]
},
"file": "netw... | networkx/networkx | 5638e1ff3d01e21c7d950615a699eb1f99987b8d | steiner_tree should accept MultiGraph
I'm using `steiner_tree` on a road network which may have multiple edges between nodes.
It looks like `steiner_tree` will fail if passed a `MultiGraph`:
- as a next-to-last step, edges are generated as `(u, v)` tuples pairwise [here](https://github.com/networkx/networkx/blob/m... | diff --git a/networkx/algorithms/approximation/steinertree.py b/networkx/algorithms/approximation/steinertree.py
index 7f91b63de..b1e248862 100644
--- a/networkx/algorithms/approximation/steinertree.py
+++ b/networkx/algorithms/approximation/steinertree.py
@@ -46,11 +46,23 @@ def metric_closure(G, weight="weight"):
... |
networkx__networkx-4241 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/classes/function.py:info"
],
"edited_modules": [
"networkx/classes/function.py:info"
]
},
"file": "networkx/classes/function.py"
},
{
"changes": {
... | networkx/networkx | b36e2991c2d4387192dc1c1f285bf888646db0fa | Add more useful ```__str__``` function for Graph objects
Currently the ```__str___``` function prints the ```G.name``` property which is ```G.graph["name"]```.
That is pretty rarely useful in my experience (often a blank string).
There is useful information in nx.info(G) and much less of it than there once was. Per... | diff --git a/doc/developer/deprecations.rst b/doc/developer/deprecations.rst
index f501fa631..9d26d74f6 100644
--- a/doc/developer/deprecations.rst
+++ b/doc/developer/deprecations.rst
@@ -55,3 +55,4 @@ Version 3.0
* In ``algorithms/centrality/betweenness.py`` remove ``edge_betweeness``.
* In ``algorithms/community_m... |
networkx__networkx-4246 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/euler.py:has_eulerian_path"
],
"edited_modules": [
"networkx/algorithms/euler.py:has_eulerian_path"
]
},
"file": "networkx/algorithms/euler.py"
},... | networkx/networkx | 2f0c56ffdc923c5fce04935447772ba9f68b69f9 | Issue with networkx.has_eulerian_path()
This issue adds to #3976
There appears to be a problem with the `has_eulerian_path` function. It returns the wrong answer on this example:
```
test_graph = nx.DiGraph()
test_graph.add_edges_from([(0, 1), (1,2), (0,2)])
print(nx.has_eulerian_path(test_graph))
print(list(n... | diff --git a/networkx/algorithms/centrality/betweenness.py b/networkx/algorithms/centrality/betweenness.py
index 0829d9b0b..6907f25b1 100644
--- a/networkx/algorithms/centrality/betweenness.py
+++ b/networkx/algorithms/centrality/betweenness.py
@@ -101,20 +101,20 @@ def betweenness_centrality(
.. [1] Ulrik Brandes... |
networkx__networkx-4629 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"examples/graphviz_layout/plot_atlas.py:atlas6",
"examples/graphviz_layout/plot_atlas.py:iso"
],
"edited_modules": [
"examples/graphviz_layout/plot_atlas.py:atlas6",
"... | networkx/networkx | 5d10139b38c93adaff5872e4e1e4e9892eb2118b | Deprecate `Ordered` graph classes
Since the next NetworkX release will drop support for Python 3.6, dictionaries should be ordered by default in all supported Python implementations moving forward (though it's worth double-checking that this is true for PyPy). Thus the `Ordered` graph classes will be redundant moving f... | diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 177ab1625..9ddc21cf6 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -45,7 +45,7 @@ Development Workflow
# Activate it
source networkx-dev/bin/activate
# Install main development and runtime dependencies of networkx
- p... |
networkx__networkx-4667 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/bipartite/matching.py:_is_connected_by_alternating_path"
],
"edited_modules": [
"networkx/algorithms/bipartite/matching.py:_is_connected_by_alternating_path"
... | networkx/networkx | e03144e0780898fed4afa976fff86f2710aa5d40 | hopcroft_karp_matching / to_vertex_cover bug
`to_vertex_cover` must give the **minimum vertex cover** as documented. Wasn't it fixed in #2384 ?
The following code gives random results:
```python
import networkx as nx
nodesU = ['r1','r2','r3','r4','r5','r6','r7','r8']
nodesV = ['c1','c2','c3','c4','c5','c6','c7... | diff --git a/networkx/algorithms/bipartite/matching.py b/networkx/algorithms/bipartite/matching.py
index 279e01604..2059d6bdf 100644
--- a/networkx/algorithms/bipartite/matching.py
+++ b/networkx/algorithms/bipartite/matching.py
@@ -346,14 +346,14 @@ def _is_connected_by_alternating_path(G, v, matched_edges, unmatched_... |
networkx__networkx-4753 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "networkx/utils/misc.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modu... | networkx/networkx | 63f550fef6712d5ea3ae09bbc341d696d65e55e3 | `networkx.utils.misc` missing `__all__`
The `misc` module in the `utils` package doesn't define an `__all__`. As a consequence, some non-networkx functionality including e.g. objects from `collections` and builtin modules are incorrectly exposed in the `networkx.utils` namespace, including networkx itself:
```python... | diff --git a/networkx/utils/misc.py b/networkx/utils/misc.py
index 4caffbe18..bd58a4ed6 100644
--- a/networkx/utils/misc.py
+++ b/networkx/utils/misc.py
@@ -19,6 +19,30 @@ import uuid
from itertools import tee, chain
import networkx as nx
+__all__ = [
+ "is_string_like",
+ "iterable",
+ "empty_generator",
... |
networkx__networkx-4938 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/algorithms/plot_parallel_betweenness.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities"... | networkx/networkx | 3146c56f0fe942f71784d5ee03aa65aec845859e | Approximation TSP - Bug when custom weight is not correctly add in input
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
When the weight has a different label than 'weight', it is no... | diff --git a/examples/algorithms/plot_parallel_betweenness.py b/examples/algorithms/plot_parallel_betweenness.py
index 7a27abaaf..aa88652b6 100644
--- a/examples/algorithms/plot_parallel_betweenness.py
+++ b/examples/algorithms/plot_parallel_betweenness.py
@@ -10,8 +10,12 @@ The function betweenness centrality accepts ... |
networkx__networkx-5007 | [
{
"changes": {
"added_entities": [
"networkx/algorithms/centrality/betweenness.py:_add_edge_keys"
],
"added_modules": [
"networkx/algorithms/centrality/betweenness.py:_add_edge_keys"
],
"edited_entities": [
"networkx/algorithms/centrality/betweenness.py:edge... | networkx/networkx | 278bb078ba18f820c547fdceb8680094b0acf20e | greedy modularity communities fails
I am trying to find communities of a directed graph (Number of Nodes: 53663 and Number of Edges: 953380) with `greedy_modularity_communities`.
This is the following error I receive:
```
line 127, in greedy_modularity_communities
if dq_heap[j].h[0] == (-dq, j, i):
Index... | diff --git a/networkx/algorithms/centrality/betweenness.py b/networkx/algorithms/centrality/betweenness.py
index dd478dcd2..aab55367f 100644
--- a/networkx/algorithms/centrality/betweenness.py
+++ b/networkx/algorithms/centrality/betweenness.py
@@ -5,12 +5,12 @@ import warnings
from networkx.utils import py_random_s... |
networkx__networkx-5048 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/drawing/nx_pylab.py:draw_networkx_edges"
],
"edited_modules": [
"networkx/drawing/nx_pylab.py:draw_networkx_edges"
]
},
"file": "networkx/drawing/nx_pylab.py"
... | networkx/networkx | 2e61dacc1ffcdcf44edb5fd68dca5f51e09db219 | `edgelist` is ignored when drawing selfloops
An issue with self-loop drawing was identified in the discussion in #4991. The `edgelist` parameter for `nx.draw_networkx_edges` is not properly handled for self-loop drawing.
### Steps to Reproduce
```python
>>> import matplotlib.pyplot as plt
>>> G = nx.path_graph(... | diff --git a/networkx/drawing/nx_pylab.py b/networkx/drawing/nx_pylab.py
index e66d0c3a4..bbffab224 100644
--- a/networkx/drawing/nx_pylab.py
+++ b/networkx/drawing/nx_pylab.py
@@ -852,10 +852,10 @@ def draw_networkx_edges(
# Draw the edges
if use_linecollection:
edge_viz_obj = _draw_networkx_edges_l... |
networkx__networkx-5153 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/drawing/layout.... | networkx/networkx | cfb4b271166485fda8ebf82f00178f28602383bb | multipartite_layout() fails when some node labels are not float
<!--- Provide a general summary of the issue in the Title above -->
Dear contributors,
I am facing currently the following issue which I believe is a bug.
Calling `multipartite_layout()` on a graph which has some nodes with labels which are not float (o... | diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index e08b785f1..f43b11a86 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -390,3 +390,14 @@ Bugs
----
Please `report bugs on GitHub <https://github.com/networkx/networkx/issues>`_.
+
+Policies
+--------
+
+All interactions with the project are subject to the... |
networkx__networkx-5287 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/community/louvain.py:louvain_partitions"
],
"edited_modules": [
"networkx/algorithms/community/louvain.py:louvain_partitions"
]
},
"file": "networkx... | networkx/networkx | 0cc70051fa0a979b1f1eab4af5b6587a6ebf8334 | `json_graph.tree_data` can cause maximum recursion depth error.
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
### Current Behavior
<!--- Tell us what happens instead of the expe... | diff --git a/networkx/algorithms/community/louvain.py b/networkx/algorithms/community/louvain.py
index ba7153521..9ee9f51c4 100644
--- a/networkx/algorithms/community/louvain.py
+++ b/networkx/algorithms/community/louvain.py
@@ -185,6 +185,7 @@ def louvain_partitions(
)
if new_mod - mod <= threshold:
... |
networkx__networkx-5305 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/distance_measures.py:_extrema_bounding",
"networkx/algorithms/distance_measures.py:eccentricity",
"networkx/algorithms/distance_measures.py:diameter",
"networ... | networkx/networkx | 98060487ad192918cfc2415fc0b5c309ff2d3565 | Distance_measures.py functions should work for weighted graphs too.
Many of the functions in `distance_measures.py` work for unweighted graphs, but have straightforward definitions for weighted graphs too. We should go through this module and upgrade each function to work for weighted graphs. It should be a straightf... | diff --git a/networkx/algorithms/distance_measures.py b/networkx/algorithms/distance_measures.py
index 5edd39621..4cb08e8cd 100644
--- a/networkx/algorithms/distance_measures.py
+++ b/networkx/algorithms/distance_measures.py
@@ -14,7 +14,7 @@ __all__ = [
]
-def _extrema_bounding(G, compute="diameter"):
+def _extre... |
networkx__networkx-5354 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "networkx/convert_matrix.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/... | networkx/networkx | 42985ba7d9f768c32c651e3e73d4d98b46776f54 | Problem with spiral layout with `equidistant=True`
`nx.spiral_layout` has an `equidistant` kwarg that is False by default. According to the docstring parameter description, this is supposed to enforce that the laid out nodes are all equidistant from one another when True. However, the iterative implementation is such t... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index eb85c36c4..d56391ba8 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -84,6 +84,7 @@ jobs:
source venv/bin/activate
pip install --upgrade pip wheel setuptools
pip install -r requirements/default.txt -r r... |
networkx__networkx-5394 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/matching.py:min_weight_matching"
],
"edited_modules": [
"networkx/algorithms/matching.py:min_weight_matching"
]
},
"file": "networkx/algorithms/matc... | networkx/networkx | c39511522b272bf65b6a415169cd48d1bf3ff5c1 | min_weight_matching gives incorrect results
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
Consider the following graph:
```python
G = nx.Graph()
G.add_edge(1, 4, weight=2)
G.... | diff --git a/doc/developer/deprecations.rst b/doc/developer/deprecations.rst
index 77d814532..a155ab765 100644
--- a/doc/developer/deprecations.rst
+++ b/doc/developer/deprecations.rst
@@ -114,3 +114,4 @@ Version 3.0
* In ``algorithms/distance_measures.py`` remove ``extrema_bounding``.
* In ``utils/misc.py`` remove `... |
networkx__networkx-5442 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/bipartite/basic.py:is_bipartite_node_set"
],
"edited_modules": [
"networkx/algorithms/bipartite/basic.py:is_bipartite_node_set"
]
},
"file": "networ... | networkx/networkx | d4b93384c5c482ff4397d8c6f4b80f660b799a9e | Bipartite projection on nodes with duplicates raises ZeroDivisionError
When calculating the 'top' nodes for the `weighted_projected_graph` [here](https://github.com/networkx/networkx/blob/6a0b4faf09ec9d3d40ad93e2ec9b431d6bab5dc4/networkx/algorithms/bipartite/projection.py#L192), if the user submits a list with duplicat... | diff --git a/doc/release/release_dev.rst b/doc/release/release_dev.rst
index 615d7c9f6..4f46ea538 100644
--- a/doc/release/release_dev.rst
+++ b/doc/release/release_dev.rst
@@ -24,6 +24,11 @@ Improvements
------------
+- `is_bipartite_node_set` now raises an exception when the tested nodes are
+ not distinct (pre... |
networkx__networkx-5444 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "networkx/readwrite/graph6.py"
}
] | networkx/networkx | 1e48dad5c6038b549d7a4a01f190ffd3765eb913 | Exception not raised when `to_graph6_bytes` is used on directed graphs
When I use `networkx.readwrite.graph6.to_graph6_bytes` with a **directed** graph, I expect a `NetworkXNotImplemented` exception to be raised (because the graph6 format is for undirected graphs only). This is also stated in the method docstring:
```... | diff --git a/networkx/readwrite/graph6.py b/networkx/readwrite/graph6.py
index 85aa25424..886ba299f 100644
--- a/networkx/readwrite/graph6.py
+++ b/networkx/readwrite/graph6.py
@@ -128,6 +128,8 @@ def from_graph6_bytes(bytes_in):
return G
+@not_implemented_for("directed")
+@not_implemented_for("multigraph")
d... |
networkx__networkx-5523 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/similarity.py:optimize_edit_paths"
],
"edited_modules": [
"networkx/algorithms/similarity.py:optimize_edit_paths"
]
},
"file": "networkx/algorithms/... | networkx/networkx | b79768389070c5533a5ae21afce15dd06cd2cff0 | Update documentation for planar embedding
Let's update the documentation to make it clear that the `check_planarity` function is the primary interface for the planar embedding tools. Also, the class `PlanarEmbedding` is tricky to make sure it maintains the planar data structure. People not familiar with those ideas sh... | diff --git a/networkx/algorithms/planarity.py b/networkx/algorithms/planarity.py
index 4d1441efc..8f4b29096 100644
--- a/networkx/algorithms/planarity.py
+++ b/networkx/algorithms/planarity.py
@@ -24,6 +24,18 @@ def check_planarity(G, counterexample=False):
If the graph is planar `certificate` is a PlanarEmbed... |
networkx__networkx-5550 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/community/modularity_max.py:greedy_modularity_communities"
],
"edited_modules": [
"networkx/algorithms/community/modularity_max.py:greedy_modularity_communities"
... | networkx/networkx | 1e5f0bde4cf4cbe4b65bf6e7be775a49556dcf23 | greedy_modularity_communities raises StopIteration for unconnected (?) graph
<!--- Provide a general summary of the issue in the Title above -->
After an update of `networkx` from 2.6.3 to 2.8, one of my tests suddenly failed with
```
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line ... | diff --git a/doc/reference/algorithms/planarity.rst b/doc/reference/algorithms/planarity.rst
index cad00dc8e..03ded5fa8 100644
--- a/doc/reference/algorithms/planarity.rst
+++ b/doc/reference/algorithms/planarity.rst
@@ -7,5 +7,5 @@ Planarity
:toctree: generated/
check_planarity
-.. autoclass:: PlanarEmbeddin... |
networkx__networkx-5705 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/comp... | networkx/networkx | fd9a6521a87005ada7b373b3bed659f0bf5cab3b | Ordering of layers in multipartite_layout changed in v2.7. Add a way to control the order?
I am trying to run a script to plot graphs, but they're coming out wrong. I've tracked down the issue to incorrect positions obtained from the multipartite_layout command, which is either ignoring or misordering the node layer in... | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index d2336e2ee..b015a4996 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -34,5 +34,5 @@ jobs:
- name: Test NetworkX
run: |
- pytest --cov=networkx --runslow --doctest-modules --pyargs ... |
networkx__networkx-5708 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/comp... | networkx/networkx | fd9a6521a87005ada7b373b3bed659f0bf5cab3b | Can't retrieve all edges for pair of nodes in Multi(Di)Graph
<!--- Provide a general summary of the issue in the Title above -->
According to the docs, I should be able to subscript into Multi(Di)Graph by pair of nodes and retrieve all the edges:
> Hence, **G.edges[u, v]['color']** provides the value of the color a... | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index d2336e2ee..b015a4996 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -34,5 +34,5 @@ jobs:
- name: Test NetworkX
run: |
- pytest --cov=networkx --runslow --doctest-modules --pyargs ... |
networkx__networkx-5892 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/distance_measures.py:_extrema_bounding",
"networkx/algorithms/distance_measures.py:eccentricity",
"networkx/algorithms/distance_measures.py:diameter",
"networ... | networkx/networkx | 98060487ad192918cfc2415fc0b5c309ff2d3565 | Update documentation surrounding `union`, `disjoint_union`, `compose` and `Graph.update`
This is an action item extracted from the discussion in #4208.
It's not always immediately clear to users how the various operators `union`, `disjoint_union`, and `compose` differ and for which use-cases each is appropriate. The... | diff --git a/networkx/algorithms/distance_measures.py b/networkx/algorithms/distance_measures.py
index 5edd39621..4cb08e8cd 100644
--- a/networkx/algorithms/distance_measures.py
+++ b/networkx/algorithms/distance_measures.py
@@ -14,7 +14,7 @@ __all__ = [
]
-def _extrema_bounding(G, compute="diameter"):
+def _extre... |
networkx__networkx-5894 | [
{
"changes": {
"added_entities": [
"networkx/classes/graph.py:_CachedPropertyResetterNode.__set__"
],
"added_modules": [
"networkx/classes/graph.py:_CachedPropertyResetterNode"
],
"edited_entities": null,
"edited_modules": [
"networkx/classes/graph.py:... | networkx/networkx | 98060487ad192918cfc2415fc0b5c309ff2d3565 | Critical NetworkX 2.8.X bug with mutable cached_properties
### Current Behavior
The `nodes()` method of a Graph is decorated with `@cached_property`.<br>
This leads to the assumption that a Graph's `nodes()` method should return a static value.<br>
This assumption is incorrect.
Notably, the `@cached_property` d... | diff --git a/networkx/classes/graph.py b/networkx/classes/graph.py
index ebbc8b535..47d5f81d9 100644
--- a/networkx/classes/graph.py
+++ b/networkx/classes/graph.py
@@ -41,6 +41,28 @@ class _CachedPropertyResetterAdj:
del od["adj"]
+class _CachedPropertyResetterNode:
+ """Data Descriptor class for _... |
networkx__networkx-5903 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/relabel.py:relabel_nodes"
],
"edited_modules": [
"networkx/relabel.py:relabel_nodes"
]
},
"file": "networkx/relabel.py"
}
] | networkx/networkx | 28f78cfa9a386620ee1179582fda1db5ffc59f84 | `relabel_nodes` does not work for callables with `__getitem__`
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
`relabel_nodes` accepts mappings in the form of functions. It differe... | diff --git a/networkx/relabel.py b/networkx/relabel.py
index 35e71536a..65297d573 100644
--- a/networkx/relabel.py
+++ b/networkx/relabel.py
@@ -114,9 +114,13 @@ def relabel_nodes(G, mapping, copy=True):
--------
convert_node_labels_to_integers
"""
- # you can pass a function f(old_label)->new_label
+... |
networkx__networkx-5988 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/dag.py:dag_longest_path",
"networkx/algorithms/dag.py:dag_longest_path_length"
],
"edited_modules": [
"networkx/algorithms/dag.py:dag_longest_path",
... | networkx/networkx | 1ce75f0f3604abd0551fa9baf20c65c3747fb328 | Weighted MultiDiGraphs never use weights in dag_longest_path and dag_longest_path_length
### Current Behavior
Given any MultiDiGraph, using dag_longest_path will always evaluate using the default_weight keyword argument.
This is because dag_longest_path uses `G.pred[v].items()` to grab the data dictionary, but the ... | diff --git a/networkx/algorithms/dag.py b/networkx/algorithms/dag.py
index 826b87ff6..d5e2735b1 100644
--- a/networkx/algorithms/dag.py
+++ b/networkx/algorithms/dag.py
@@ -1006,7 +1006,15 @@ def dag_longest_path(G, weight="weight", default_weight=1, topo_order=None):
dist = {} # stores {v : (length, u)}
for... |
networkx__networkx-6082 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/drawing/plot_eigenvalues.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | networkx/networkx | ce692bd3f05900608b829b983838d099b378ca8f | Improve test coverage for generators/tree.py
Increase coverage over [`tree.py`](https://github.com/networkx/networkx/blob/main/networkx/generators/trees.py) so all the code blocks that are highlighted in
https://app.codecov.io/gh/networkx/networkx/blob/main/networkx/generators/trees.py are properly tested.
| diff --git a/examples/drawing/plot_eigenvalues.py b/examples/drawing/plot_eigenvalues.py
index b0df67ae9..67322cfd1 100644
--- a/examples/drawing/plot_eigenvalues.py
+++ b/examples/drawing/plot_eigenvalues.py
@@ -14,7 +14,7 @@ m = 5000 # 5000 edges
G = nx.gnm_random_graph(n, m, seed=5040) # Seed for reproducibility
... |
networkx__networkx-6098 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/drawing/plot_eigenvalues.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | networkx/networkx | bcf607cf7ce4009ca37786b2fcd84e548f1833f5 | `connectionstyle` argument of `nx.draw_networkx_edges()` does not work properly for multigraphs and undirected graphs
`connectionstyle` argument of `nx.draw_networkx_edges()` does not work properly for MultiGraphs and Undirected graphs. Consider the following example:
```
G=nx.DiGraph([(1,2),(3,1),(3,2)])
position... | diff --git a/examples/drawing/plot_eigenvalues.py b/examples/drawing/plot_eigenvalues.py
index b0df67ae9..67322cfd1 100644
--- a/examples/drawing/plot_eigenvalues.py
+++ b/examples/drawing/plot_eigenvalues.py
@@ -14,7 +14,7 @@ m = 5000 # 5000 edges
G = nx.gnm_random_graph(n, m, seed=5040) # Seed for reproducibility
... |
networkx__networkx-6101 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/drawing/plot_eigenvalues.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | networkx/networkx | bcf607cf7ce4009ca37786b2fcd84e548f1833f5 | Improve test coverage for multigraph class
I discovered there are still some red spots in this link https://app.codecov.io/gh/networkx/networkx/blob/main/networkx/classes/multigraph.py and will like to work on it.
The tests will be added in https://github.com/networkx/networkx/blob/main/networkx/classes/tests/test_... | diff --git a/examples/drawing/plot_eigenvalues.py b/examples/drawing/plot_eigenvalues.py
index b0df67ae9..67322cfd1 100644
--- a/examples/drawing/plot_eigenvalues.py
+++ b/examples/drawing/plot_eigenvalues.py
@@ -14,7 +14,7 @@ m = 5000 # 5000 edges
G = nx.gnm_random_graph(n, m, seed=5040) # Seed for reproducibility
... |
networkx__networkx-6104 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/drawing/plot_eigenvalues.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | networkx/networkx | bcf607cf7ce4009ca37786b2fcd84e548f1833f5 | boykov_kolmogorov and dinitz algorithms allow cutoff but are not tested
I noticed in *test_maxflow.py* that cutoff tests don't include boykov_kolmogorov and dinitz algorithms. I'm already working on this! | diff --git a/examples/drawing/plot_eigenvalues.py b/examples/drawing/plot_eigenvalues.py
index b0df67ae9..67322cfd1 100644
--- a/examples/drawing/plot_eigenvalues.py
+++ b/examples/drawing/plot_eigenvalues.py
@@ -14,7 +14,7 @@ m = 5000 # 5000 edges
G = nx.gnm_random_graph(n, m, seed=5040) # Seed for reproducibility
... |
networkx__networkx-6105 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/drawing/plot_eigenvalues.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | networkx/networkx | bcf607cf7ce4009ca37786b2fcd84e548f1833f5 | Improve test coverage for graph class
I discovered there are still some red spots in this link https://app.codecov.io/gh/networkx/networkx/blob/main/networkx/classes/graph.py and will like to work on it.
The tests will be added in https://github.com/networkx/networkx/blob/main/networkx/classes/tests/test_graph.py
... | diff --git a/examples/drawing/plot_eigenvalues.py b/examples/drawing/plot_eigenvalues.py
index b0df67ae9..67322cfd1 100644
--- a/examples/drawing/plot_eigenvalues.py
+++ b/examples/drawing/plot_eigenvalues.py
@@ -14,7 +14,7 @@ m = 5000 # 5000 edges
G = nx.gnm_random_graph(n, m, seed=5040) # Seed for reproducibility
... |
networkx__networkx-6149 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/swap.py:directed_edge_swap",
"networkx/algorithms/swap.py:double_edge_swap",
"networkx/algorithms/swap.py:connected_double_edge_swap"
],
"edited_modules":... | networkx/networkx | 9374d1ab1cc732a1a86ef1ed2438bc51e834f20d | directed_edge_swap: ZeroDivisionError when passing a digraph without edges
I was working on improving test coverage for `swap.py` and tested `directed_edge_swap` with a digraph without edges. That resulted in a ZeroDivisionError from `nx.utils.cumulative_distribution`.
### Steps to Reproduce
```python
from netw... | diff --git a/networkx/algorithms/swap.py b/networkx/algorithms/swap.py
index 9b2f06db6..c02a4b3ca 100644
--- a/networkx/algorithms/swap.py
+++ b/networkx/algorithms/swap.py
@@ -46,7 +46,7 @@ def directed_edge_swap(G, *, nswap=1, max_tries=100, seed=None):
NetworkXError
If `G` is not directed, or
... |
networkx__networkx-6151 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/smal... | networkx/networkx | 9374d1ab1cc732a1a86ef1ed2438bc51e834f20d | In smallworld.py: ZeroDivisionError when passing a graph without edges
This is a similar error to #6144 that comes from the use of `nx.utils.cumulative_distribution` with graphs without edges. In #6144 there is a deeper explanation of the bug.
| diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 2e3f86b6c..b9f4e96de 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- ... |
networkx__networkx-6240 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/traversal/depth_first_search.py:dfs_labeled_edges"
],
"edited_modules": [
"networkx/algorithms/traversal/depth_first_search.py:dfs_labeled_edges"
]
},
... | networkx/networkx | d82815dba6c8ddce19cd49f700298dc82a58f066 | nx.dfs_labeled_edges does not return last visited edge if depth_limit is specified
`nx.dfs_labeled_edges` does not return last (deepest) visited edge when traversing backwards if **depth_limit** is specified.
### Current Behavior
```
graph = nx.path_graph(5, nx.DiGraph)
list(nx.dfs_labeled_edges(graph, source=0))... | diff --git a/networkx/algorithms/traversal/depth_first_search.py b/networkx/algorithms/traversal/depth_first_search.py
index 0ccca4ff9..c250787bf 100644
--- a/networkx/algorithms/traversal/depth_first_search.py
+++ b/networkx/algorithms/traversal/depth_first_search.py
@@ -364,12 +364,15 @@ def dfs_labeled_edges(G, sour... |
networkx__networkx-6259 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/convert_matrix.py:from_numpy_array"
],
"edited_modules": [
"networkx/convert_matrix.py:from_numpy_array"
]
},
"file": "networkx/convert_matrix.py"
}
] | networkx/networkx | 53be757de9a87a3413943737fbf8478bb23b17c7 | Allow caller to opt out of adding `weight` attributes in `from_numpy_array`
### Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
Right now, calls to `from_numpy_array` add a `weight` attribute to all edges in the newly created (non-multi)graph.
### Expected Behavior
<!--- Te... | diff --git a/networkx/convert_matrix.py b/networkx/convert_matrix.py
index 7540ad780..8f8202f69 100644
--- a/networkx/convert_matrix.py
+++ b/networkx/convert_matrix.py
@@ -1000,7 +1000,7 @@ def to_numpy_array(
return A
-def from_numpy_array(A, parallel_edges=False, create_using=None):
+def from_numpy_array(A,... |
networkx__networkx-6265 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py:_consistent_PT"
],
"edited_modules": [
"networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py:_consistent_PT"
... | networkx/networkx | 9c79d7d37cd6d464d0592fd9138d58b252f9b4be | Improve test coverage for line graph generators
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
Currently we don't have full coverage for the line graphs generators. Code blocks wh... | diff --git a/doc/developer/about_us.rst b/doc/developer/about_us.rst
index b785cf2e3..a96a68948 100644
--- a/doc/developer/about_us.rst
+++ b/doc/developer/about_us.rst
@@ -145,6 +145,7 @@ to add your name to the bottom of the list.
- Philip Boalch
- Matt Schwennesen, Github: `mjschwenne <https://github.com/mjschwenn... |
networkx__networkx-6270 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py:_consistent_PT"
],
"edited_modules": [
"networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py:_consistent_PT"
... | networkx/networkx | 9abaf6e5a04adec812d967b53cfa4c560a459e6b | vf2pp_is_isomorphic returns wrong results
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
### Current Behavior
```
import networkx as nx
g = nx.MultiDiGraph({0: [1, 1, 2, 2, 3],... | diff --git a/networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py b/networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py
index 90e8fe864..40d19e332 100644
--- a/networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py
+++ b/networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py
@@ -232,16 +232... |
networkx__networkx-6355 | [
{
"changes": {
"added_entities": [
"benchmarks/benchmarks/benchmark_algorithms.py:AlgorithmBenchmarksConnectedGraphsOnly.setup",
"benchmarks/benchmarks/benchmark_algorithms.py:AlgorithmBenchmarksConnectedGraphsOnly.time_eigenvector_centrality_numpy"
],
"added_modules": [
... | networkx/networkx | b48317b78efa511c49dc2fb9bd2e27aa71665238 | Improve test coverage for algorithms in maxflow.py
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
Currently we don't have full coverage for algorithms in maxflow.py. Code blocks w... | diff --git a/benchmarks/benchmarks/benchmark_algorithms.py b/benchmarks/benchmarks/benchmark_algorithms.py
index 8991912c7..34df6ed00 100644
--- a/benchmarks/benchmarks/benchmark_algorithms.py
+++ b/benchmarks/benchmarks/benchmark_algorithms.py
@@ -48,3 +48,28 @@ class AlgorithmBenchmarks:
def time_average_clust... |
networkx__networkx-6471 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/classes/backends.py:_dispatch"
],
"edited_modules": [
"networkx/classes/backends.py:_dispatch"
]
},
"file": "networkx/classes/backends.py"
}
] | networkx/networkx | 4a6f2f43508d26d0eb9884a24cba28721d5fb875 | upgrade 2.8.6 -> 3.0 breaks shortest_path()
<!--- Provide a general summary of the issue in the Title above -->
I just re-installed networkx without specifying version so I was upgraded from 2.8.6 to 3.0
Running unaltered code calling nx.shortest_path(*args, **kwargs) under 2.8.6 runs fine and produces correct resul... | diff --git a/networkx/classes/backends.py b/networkx/classes/backends.py
index 183db1708..c96f4896a 100644
--- a/networkx/classes/backends.py
+++ b/networkx/classes/backends.py
@@ -128,7 +128,13 @@ def _dispatch(func=None, *, name=None):
@functools.wraps(func)
def wrapper(*args, **kwds):
- graph = ar... |
networkx__networkx-6478 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "networkx/algorithms/components/connected.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": nul... | networkx/networkx | 4a6f2f43508d26d0eb9884a24cba28721d5fb875 | nx.DiGraph.to_undirected() not working as expected for bidirectional edges when using as_view = True
Problem: When using `to_undirected()` on a DiGraph the properties are inconsistent, i.e., differ depending on if as_view was set to True or False. More precisely, the reported degree is not as expected when using `as_vi... | diff --git a/networkx/algorithms/components/connected.py b/networkx/algorithms/components/connected.py
index 2e7488092..192d0b841 100644
--- a/networkx/algorithms/components/connected.py
+++ b/networkx/algorithms/components/connected.py
@@ -101,6 +101,7 @@ def number_connected_components(G):
return sum(1 for cc in... |
networkx__networkx-6486 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/tree/mst.py:prim_mst_edges"
],
"edited_modules": [
"networkx/algorithms/tree/mst.py:prim_mst_edges"
]
},
"file": "networkx/algorithms/tree/mst.py"
... | networkx/networkx | d76f3bfa9a26c3956323764d14868bf3ff8f7e24 | Improve test coverage for MST algorithms
I found that the test coverage for the mst.py file in algorithms/tree is 92.49%
https://app.codecov.io/gh/networkx/networkx/blob/main/networkx/algorithms/tree/mst.py
I am working on improving this.
Current Behavior
We don't test all the paths the code can take us.
E... | diff --git a/networkx/algorithms/tree/mst.py b/networkx/algorithms/tree/mst.py
index a866aeefd..8ec693d66 100644
--- a/networkx/algorithms/tree/mst.py
+++ b/networkx/algorithms/tree/mst.py
@@ -334,12 +334,22 @@ def prim_mst_edges(G, minimum, weight="weight", keys=True, data=True, ignore_nan
con... |
networkx__networkx-6760 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/operators/all.py:union_all",
"networkx/algorithms/operators/all.py:compose_all",
"networkx/algorithms/operators/all.py:intersection_all"
],
"edited_module... | networkx/networkx | a63c8bd3873fc7885726215248c7fe17e9cefd4c | Docstring of `johnson` algorithm handling of weight incorrect
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
### Current Behavior
The documentation says:
```
If no such edge ... | diff --git a/networkx/algorithms/operators/all.py b/networkx/algorithms/operators/all.py
index 2dd46434b..73b02f60a 100644
--- a/networkx/algorithms/operators/all.py
+++ b/networkx/algorithms/operators/all.py
@@ -32,8 +32,16 @@ def union_all(graphs, rename=()):
ValueError
If `graphs` is an empty list.
+ ... |
networkx__networkx-6788 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/cycles.py:_min_cycle_basis",
"networkx/algorithms/cycles.py:_min_cycle",
"networkx/algorithms/cycles.py:_path_to_cycle"
],
"edited_modules": [
"ne... | networkx/networkx | a52706d4f367916cba97dcc57efdd46d7c174f54 | Minimum cycle basis incorrect
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
### Current Behavior
Consider the complete weighted graph on the vertices 0, 1, 2, 3 with edge weight... | diff --git a/networkx/algorithms/cycles.py b/networkx/algorithms/cycles.py
index 19c1c9959..16c87c43c 100644
--- a/networkx/algorithms/cycles.py
+++ b/networkx/algorithms/cycles.py
@@ -4,7 +4,7 @@ Cycle finding algorithms
========================
"""
-from collections import defaultdict
+from collections import Cou... |
networkx__networkx-6798 | [
{
"changes": {
"added_entities": [
"networkx/algorithms/planarity.py:PlanarEmbedding.__init__",
"networkx/algorithms/planarity.py:PlanarEmbedding.__forbidden",
"networkx/algorithms/planarity.py:PlanarEmbedding.remove_node",
"networkx/algorithms/planarity.py:PlanarEmbedding.... | networkx/networkx | 0204a246a8bfba38153f03b3967a669c05a7181f | Modifying the edges of a PlannarEmbedding graph invalidates its structure.
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
If an edge is removed and another one added to a `PlanarE... | diff --git a/networkx/algorithms/planarity.py b/networkx/algorithms/planarity.py
index c5611eca3..59206b412 100644
--- a/networkx/algorithms/planarity.py
+++ b/networkx/algorithms/planarity.py
@@ -855,6 +855,22 @@ class PlanarEmbedding(nx.DiGraph):
"""
+ def __init__(self, incoming_graph_data=None, **attr):... |
networkx__networkx-6837 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/time_dependent.py:cd_index"
],
"edited_modules": [
"networkx/algorithms/time_dependent.py:cd_index"
]
},
"file": "networkx/algorithms/time_dependent... | networkx/networkx | ff9c27b40f1b6159020d1da007f4e44e16e082a4 | Multi-line entries in GML files not supported
I am dealing with GML files that contain string entries spread across multiple lines. Networkx cannot parse such entries (Cytoscape for example can).
### Current Behavior
Parsing GML files with multi-line entries fails with `NetworkXError: cannot tokenize...`.
###... | diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 2942cd8fe..5e2552789 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -14,10 +14,20 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- - run: |
+ - ... |
networkx__networkx-6908 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": [
"networkx/algorithms/tree/operations.py:join_trees"
],
"added_modules": [... | networkx/networkx | 88097f7d7f798ec49eb868691dde77cf791a67ec | Rename nx.join to something which gives more context about operations on trees
While reviewing #6503 [@dschult noted](https://github.com/networkx/networkx/pull/6503#issuecomment-1707200999) that the current function name `nx.join` doesn't give enough information to the user. The function is used to "join" trees.
Thi... | diff --git a/doc/conf.py b/doc/conf.py
index ec7c640cf..f2eac1f60 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -1,3 +1,4 @@
+import os
from datetime import date
from sphinx_gallery.sorting import ExplicitOrder, FileNameSortKey
from warnings import filterwarnings
@@ -81,12 +82,15 @@ exclude_patterns = ["release/rele... |
networkx__networkx-6937 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/classes/reportviews.py:OutEdgeDataView.__init__",
"networkx/classes/reportviews.py:OutMultiEdgeDataView.__init__",
"networkx/classes/reportviews.py:OutEdgeView.__call__",
... | networkx/networkx | 0eb2f98ce29fd84da4907cd9c7dd33e2d561410e | Unify documentation README with contributor guide
It was pointed out in #6766 that we have a README in the `doc/` folder that describes how to build the documentation. I think the go-to reference for this information is the contributor guide, and these two documents are not necessarily in sync. However, contributors ha... | diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 2ab68ed29..e92e9373a 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -403,7 +403,7 @@ Then create a baseline image to compare against later::
$ pytest -k test_barbell --mpl-generate-path=networkx/drawing/tests/baseline
-.. note: In order to keep th... |
networkx__networkx-6957 | [
{
"changes": {
"added_entities": [
"doc/conf.py:new_setitem",
"doc/conf.py:new_str"
],
"added_modules": [
"doc/conf.py:new_setitem",
"doc/conf.py:new_str"
],
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
... | networkx/networkx | ba11717e40ac4466f322f1c448eb70a5914c8b6e | Discrepancy in 'strongly_connected_components_recursive' for Detecting SCCs
Hey NetworkX team! 👋
### Description:
While attempting to identify strongly connected components (SCCs) of a graph using the `strongly_connected_components`, `strongly_connected_components_recursive`, and `kosaraju_strongly_connected_compone... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index a1e6ef043..f01de2033 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -38,6 +38,10 @@ jobs:
pip install -r requirements/extra.txt
pip install -r requirements/example.txt
pip install -r requirements/doc.t... |
networkx__networkx-7024 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/clique.py:graph_clique_number",
"networkx/algorithms/clique.py:graph_number_of_cliques",
"networkx/algorithms/clique.py:number_of_cliques",
"networkx/algorith... | networkx/networkx | 3b95b3b39e4bb57831e9611b820054218af15a71 | ```is_k_edge_connected``` incorrectly returns True for k=2 with multi-component graphs without bridges
### Current Behavior
The implementation of ```is_k_edge_connected``` currently defers to ```is_connected``` for k=1, to ```has_bridges``` for k=2, and runs the full check for k>2.
As a result, this returns True ... | diff --git a/networkx/algorithms/clique.py b/networkx/algorithms/clique.py
index b725eabb4..7fd7e8166 100644
--- a/networkx/algorithms/clique.py
+++ b/networkx/algorithms/clique.py
@@ -18,11 +18,8 @@ __all__ = [
"find_cliques_recursive",
"make_max_clique_graph",
"make_clique_bipartite",
- "graph_cliqu... |
networkx__networkx-7171 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/chordal.py:_find_chordality_breaker"
],
"edited_modules": [
"networkx/algorithms/chordal.py:_find_chordality_breaker"
]
},
"file": "networkx/algorit... | networkx/networkx | f34dda2c924924edb6a350c62420fb0187ab150f | Document walk_type in directed_laplacian and friends
The current documentation of the "walk_type" argument to the many directed laplacian matrix approaches is opaque. And the logic is hidden within the actual code because it occurs in a helper function presumably so the logic is the same for all these functions. The lo... | diff --git a/doc/developer/deprecations.rst b/doc/developer/deprecations.rst
index a2c6700ce..3b8ce95c5 100644
--- a/doc/developer/deprecations.rst
+++ b/doc/developer/deprecations.rst
@@ -46,10 +46,6 @@ Version 3.3
* Remove pydot functionality ``drawing/nx_pydot.py``, if pydot is still not being maintained. See #5723... |
networkx__networkx-7182 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
... | networkx/networkx | 267e33e99be42ed717a69817ddfbbd5c20238a2e | Should `is_distance_regular` and `intersection_array` have @not_implemented_for?
Something I noticed while reviewing #5849 :
The docstrings for [`is_distance_regular`](https://github.com/networkx/networkx/blob/d68caf64b057f3c5f0adf4f09ce3843e4f2395c4/networkx/algorithms/distance_regular.py#L21) and [`intersection_ar... | diff --git a/doc/conf.py b/doc/conf.py
index 1d8ea3987..f54a02289 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -248,9 +248,11 @@ numpydoc_show_class_members = False
plot_pre_code = """
import networkx as nx
+import numpy as np
+np.random.seed(42)
"""
-plot_formats = [("png", 100), "pdf"]
+plot_formats = [("png"... |
networkx__networkx-7254 | [
{
"changes": {
"added_entities": [
"networkx/generators/classic.py:kneser_graph"
],
"added_modules": [
"networkx/generators/classic.py:kneser_graph"
],
"edited_entities": null,
"edited_modules": null
},
"file": "networkx/generators/classic.py"
}
] | networkx/networkx | d6569adf7c224a9c85c0e4e4c92435f772f73582 | Return type of `general_k_edge_subgraphs` is incorrect in docstring
In networkx 3.2.1, `general_k_edge_subgraphs` return type in docstring says this:
```
k_edge_subgraphs : a generator of nx.Graphs that are k-edge-subgraphs
Each k-edge-subgraph is a maximal set of nodes that defines a subgraph
o... | diff --git a/doc/reference/generators.rst b/doc/reference/generators.rst
index 14fbb5948..d3b980fec 100644
--- a/doc/reference/generators.rst
+++ b/doc/reference/generators.rst
@@ -34,6 +34,7 @@ Classic
dorogovtsev_goltsev_mendes_graph
empty_graph
full_rary_tree
+ kneser_graph
ladder_graph
lollipo... |
networkx__networkx-7327 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/geospatial/delaunay.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"ed... | networkx/networkx | 00e3c4c4ecad08bff17b894f6d39bcc96a3c583f | `single_target_shortest_path_length` on main returns dict, not iterator
There seem to be inconsistencies introduced in #6584 and #7161. For example, for `single_target_shortest_path_length`, the warning says that it will return dict (not iterator) starting in version 3.5, but it returns a dict _today_. | diff --git a/examples/geospatial/delaunay.py b/examples/geospatial/plot_delaunay.py
similarity index 96%
rename from examples/geospatial/delaunay.py
rename to examples/geospatial/plot_delaunay.py
index edafe0635..799381fff 100644
--- a/examples/geospatial/delaunay.py
+++ b/examples/geospatial/plot_delaunay.py
@@ -58,7 ... |
networkx__networkx-7329 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/geospatial/delaunay.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"ed... | networkx/networkx | 00e3c4c4ecad08bff17b894f6d39bcc96a3c583f | `strategy_saturation_largest_first` endless generator
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
### Current Behavior
`strategy_saturation_largest_first` generator does not... | diff --git a/examples/geospatial/delaunay.py b/examples/geospatial/plot_delaunay.py
similarity index 96%
rename from examples/geospatial/delaunay.py
rename to examples/geospatial/plot_delaunay.py
index edafe0635..799381fff 100644
--- a/examples/geospatial/delaunay.py
+++ b/examples/geospatial/plot_delaunay.py
@@ -58,7 ... |
networkx__networkx-7332 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/similarity.py:generate_random_paths"
],
"edited_modules": [
"networkx/algorithms/similarity.py:generate_random_paths"
]
},
"file": "networkx/algorit... | networkx/networkx | 7e97d4c040a39cc4cbe22b2ab78c10f028610bb9 | `generate_random_paths` does not have a `seed` argument
The `nx.generate_random_paths` iterator creates paths of specified length from `G`. This function is not seeded, so there is currently no way to reproduce results between runs. | diff --git a/networkx/algorithms/similarity.py b/networkx/algorithms/similarity.py
index 765849984..24f303b13 100644
--- a/networkx/algorithms/similarity.py
+++ b/networkx/algorithms/similarity.py
@@ -20,6 +20,7 @@ from dataclasses import dataclass
from itertools import product
import networkx as nx
+from networkx.... |
networkx__networkx-7336 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/approximation/steinertree.py:_mehlhorn_steiner_tree",
"networkx/algorithms/approximation/steinertree.py:steiner_tree"
],
"edited_modules": [
"networkx/alg... | networkx/networkx | d71ce117bd4d13c3aa15425b732eb59029f46737 | Condition in `test_louvain::test_threshold` not representative of graphs with same parameters but different seed.
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
### Current Behavi... | diff --git a/networkx/algorithms/approximation/clustering_coefficient.py b/networkx/algorithms/approximation/clustering_coefficient.py
index f95c86d2a..545fc6553 100644
--- a/networkx/algorithms/approximation/clustering_coefficient.py
+++ b/networkx/algorithms/approximation/clustering_coefficient.py
@@ -45,6 +45,11 @@ ... |
networkx__networkx-7412 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/classes/coreviews.py:FilterAtlas.__len__",
"networkx/classes/coreviews.py:FilterAdjacency.__len__"
],
"edited_modules": [
"networkx/classes/coreviews.py:FilterAtlas"... | networkx/networkx | e97634ab839f7eb40e4887c4b59d13c267977df3 | networkx.exception.NetworkXUnfeasible when creating a graph from pandas
### Current Behavior
When creating a graph from a pandas dataframe, if the row/columns names are integer less than the dimensionality of the frame, an error occurs:
```
raise nx.NetworkXUnfeasible(
networkx.exception.NetworkXUnfeasible: The... | diff --git a/networkx/classes/coreviews.py b/networkx/classes/coreviews.py
index f4b54c7b7..9cbf57850 100644
--- a/networkx/classes/coreviews.py
+++ b/networkx/classes/coreviews.py
@@ -281,7 +281,13 @@ class FilterAtlas(Mapping): # nodedict, nbrdict, keydict
self.NODE_OK = NODE_OK
def __len__(self):
- ... |
networkx__networkx-7422 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/approximation/steinertree.py:_remove_nonterminal_leaves"
],
"edited_modules": [
"networkx/algorithms/approximation/steinertree.py:_remove_nonterminal_leaves"
... | networkx/networkx | 82df6d90c1bd891eb7bfbeb9d1c65ec12b068498 | Steiner tree approximation does not iteratively remove nonterminal leaves
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
The last step in both steiner tree approximation algorithms ... | diff --git a/networkx/algorithms/approximation/steinertree.py b/networkx/algorithms/approximation/steinertree.py
index c6c834f42..f4840effd 100644
--- a/networkx/algorithms/approximation/steinertree.py
+++ b/networkx/algorithms/approximation/steinertree.py
@@ -113,10 +113,21 @@ def _kou_steiner_tree(G, terminal_nodes, ... |
networkx__networkx-7432 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "networkx/algorithms/assortativity/pairs.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | networkx/networkx | c78b8b41c1c907a220f7e0d6cccbbaf858042d92 | Dispatched nx-loopback tests performance degradation
This is something I noticed while investigating #7354. The test suite when run with the `nx-loopback` backend is significantly slower than when run without loopback. I'd expect it to be a little slower due to the extra conversion overhead, but AIUI that should be lim... | diff --git a/networkx/algorithms/assortativity/pairs.py b/networkx/algorithms/assortativity/pairs.py
index 5a1d6f8e1..1b8c3460d 100644
--- a/networkx/algorithms/assortativity/pairs.py
+++ b/networkx/algorithms/assortativity/pairs.py
@@ -1,4 +1,4 @@
-"""Generators of x-y pairs of node data."""
+"""Generators of x-y pai... |
networkx__networkx-7437 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/non_randomness.py:non_randomness"
],
"edited_modules": [
"networkx/algorithms/non_randomness.py:non_randomness"
]
},
"file": "networkx/algorithms/no... | networkx/networkx | f58c3878f3d2c60f62bf29a9df8826f611016217 | Update tests for macOS v14
`macos-latest` has switched from macOS v12 to macOS v14:
https://github.com/actions/runner-images/tree/main | diff --git a/doc/developer/about_us.rst b/doc/developer/about_us.rst
index 20ac85167..e9e41adf2 100644
--- a/doc/developer/about_us.rst
+++ b/doc/developer/about_us.rst
@@ -153,6 +153,7 @@ to add your name to the bottom of the list.
- Sebastiano Vigna, Github: `https://github.com/vigna`
- Aaron Zolnai-Lucas, GitHub: ... |
networkx__networkx-7445 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/convert_matrix.py:from_pandas_edgelist"
],
"edited_modules": [
"networkx/convert_matrix.py:from_pandas_edgelist"
]
},
"file": "networkx/convert_matrix.py"
}
... | networkx/networkx | ad673ffed8479b1303c156fa785f80fdb0f8f934 | keys added as edge attributes when using nx.from_pandas_edgelist
Hi there,
regarding the nx.from_pandas_edgelist function, when creating multigraphs:
### Current Behavior
Following the example in the documentation, but calling "edge_attr = True" instead of "edge_attr=["weight", "color"]", the edge keys get added... | diff --git a/networkx/convert_matrix.py b/networkx/convert_matrix.py
index d4c924a85..12017fe26 100644
--- a/networkx/convert_matrix.py
+++ b/networkx/convert_matrix.py
@@ -348,7 +348,7 @@ def from_pandas_edgelist(
edge_attr : str or int, iterable, True, or None
A valid column name (str or int) or iterabl... |
networkx__networkx-7465 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/bipartite/edgelist.py:parse_edgelist"
],
"edited_modules": [
"networkx/algorithms/bipartite/edgelist.py:parse_edgelist"
]
},
"file": "networkx/algor... | networkx/networkx | 1d719c69f7fe035a10f09321efb21d1025faa52b | edgelist reader removes deliminators if deliminator is white-space and file has empty fields [BUG]
This `line.strip` without an argument, means a white-space delimited file (e.g. tab, which is quite common) with empty edge attribute(s) in the last column(s) results in a crash with error `Edge data [...] and data_keys ... | diff --git a/networkx/algorithms/bipartite/edgelist.py b/networkx/algorithms/bipartite/edgelist.py
index ebd47b032..db6ef9d8e 100644
--- a/networkx/algorithms/bipartite/edgelist.py
+++ b/networkx/algorithms/bipartite/edgelist.py
@@ -220,7 +220,7 @@ def parse_edgelist(
if not len(line):
continue
... |
networkx__networkx-7473 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/generators/classic.py:dorogovtsev_goltsev_mendes_graph"
],
"edited_modules": [
"networkx/generators/classic.py:dorogovtsev_goltsev_mendes_graph"
]
},
"file": "... | networkx/networkx | fe5e2603708ff9aa6f757fc38e0dd3b272a76b11 | Parameter off by one in dorogovtsev_goltsev_mendes_graph
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general summary of the issue in the Title above -->
### Current Behavior
The parameter `n` of `dorogovtsev_goltsev_mendes_gr... | diff --git a/networkx/algorithms/dominance.py b/networkx/algorithms/dominance.py
index ab841fe21..30cb8115c 100644
--- a/networkx/algorithms/dominance.py
+++ b/networkx/algorithms/dominance.py
@@ -50,9 +50,9 @@ def immediate_dominators(G, start):
References
----------
- .. [1] K. D. Cooper, T. J. Harvey,... |
networkx__networkx-7549 | [
{
"changes": {
"added_entities": [
"benchmarks/benchmarks/benchmark_algorithms.py:AlgorithmBenchmarksConnectedGraphsOnly.setup",
"benchmarks/benchmarks/benchmark_algorithms.py:AlgorithmBenchmarksConnectedGraphsOnly.time_eigenvector_centrality_numpy"
],
"added_modules": [
... | networkx/networkx | 24d3fe74230e5ed49d5ac8b723895493d5aafb0a | Unstable and Incorrect "nx.eigenvector_centrality_numpy" result when the graph is disconnected
Hello! Sorry for bothering you again!
I found that when the graph is disconnected, the result of the `nx.eigenvector_centrality_numpy` is unstable and different from the `nx.eigenvector_centrality`. Here is the reduced test ... | diff --git a/benchmarks/benchmarks/benchmark_algorithms.py b/benchmarks/benchmarks/benchmark_algorithms.py
index 8991912c7..34df6ed00 100644
--- a/benchmarks/benchmarks/benchmark_algorithms.py
+++ b/benchmarks/benchmarks/benchmark_algorithms.py
@@ -48,3 +48,28 @@ class AlgorithmBenchmarks:
def time_average_clust... |
networkx__networkx-7626 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"examples/algorithms/plot... | networkx/networkx | 409979eff35f02eff54f4eea3731736bd431dc2e | Clarification of `networkx.karate_club_graph()` Dataset
> From what I can tell, the "club" entries in the karate club data uses "Club After Fission" (Column 4) of Table 1, which is repeated as "Club After Split From Data" (column 5) in Table 3 of the original paper, which does indeed have "Mr. Hi's" at the 9th row (acc... | diff --git a/doc/conf.py b/doc/conf.py
index 37ad344d6..ae2609f67 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -155,6 +155,10 @@ html_theme_options = {
"version_match": "latest" if "dev" in version else version,
},
"show_version_warning_banner": True,
+ "analytics": {
+ "plausible_analytic... |
networkx__networkx-7636 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/distance_measures.py:harmonic_diameter"
],
"edited_modules": [
"networkx/algorithms/distance_measures.py:harmonic_diameter"
]
},
"file": "networkx/a... | networkx/networkx | 6e1d5fb7a4cd6087d2d37cb440f09a8e5c5f4430 | Allow edge weights for `harmonic_diameter`
The harmonic diameter (which is the harmonic mean of all distances) from #5251 uses path lengths for unweighted networks. It would be good to allow weights path lengths via a keyword argument like `weight=None`. This kwarg can have the same name doc_string entry and optional ... | diff --git a/networkx/algorithms/distance_measures.py b/networkx/algorithms/distance_measures.py
index 8e15bf8d9..282bd7016 100644
--- a/networkx/algorithms/distance_measures.py
+++ b/networkx/algorithms/distance_measures.py
@@ -387,8 +387,8 @@ def diameter(G, e=None, usebounds=False, weight=None):
return max(e.va... |
networkx__networkx-7721 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/approximation/traveling_salesman.py:traveling_salesman_problem"
],
"edited_modules": [
"networkx/algorithms/approximation/traveling_salesman.py:traveling_salesman... | networkx/networkx | 5c3e8beef128f532b536d2d4a9f7e309ed53416b | traveling_salesman_problem seems to ignore the weight parameter
### Current Behavior
`traveling_salesman_problem` returns long paths when `weight` is named something other than 'weight'.
### Expected Behavior
`traveling_salesman_problem` should use the `weight` param to allow the correct edge attribute to be s... | diff --git a/networkx/algorithms/approximation/traveling_salesman.py b/networkx/algorithms/approximation/traveling_salesman.py
index 2080c99ae..f2c37d9cc 100644
--- a/networkx/algorithms/approximation/traveling_salesman.py
+++ b/networkx/algorithms/approximation/traveling_salesman.py
@@ -334,7 +334,9 @@ def traveling_s... |
networkx__networkx-7729 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/classes/coreviews.py:FilterMultiInner.__getitem__"
],
"edited_modules": [
"networkx/classes/coreviews.py:FilterMultiInner"
]
},
"file": "networkx/classes/corev... | networkx/networkx | 9beaf7a0b59fe21775cd93862d9c7b28152a2d8c | `MultiGraph` views return inconsistent `has_edge` results
### Current Behavior
Filtered views of a `MultiGraph`, created with `edge_subgraph`, return inconsistent results from `has_edge`.
### Expected Behavior
Match the same results from a `Graph`: either `True` if the edge exists in the subgraph view, or `Fal... | diff --git a/networkx/classes/coreviews.py b/networkx/classes/coreviews.py
index a6e85213f..4769ffa71 100644
--- a/networkx/classes/coreviews.py
+++ b/networkx/classes/coreviews.py
@@ -397,7 +397,11 @@ class FilterMultiInner(FilterAdjacency): # muliedge_seconddict
yield n
def __getitem__(self, ... |
networkx__networkx-7804 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/generators/expanders.py:is_regular_expander"
],
"edited_modules": [
"networkx/generators/expanders.py:is_regular_expander"
]
},
"file": "networkx/generators/ex... | networkx/networkx | b369de6e892c1f0932f6118d322aed55cb0618f6 | wrong bound in is_regular_expander
The bound in `is_regular_expander` on [this line](https://github.com/networkx/networkx/blob/ba6744c1dc432c7beea0210584f16b80761c5fda/networkx/generators/expanders.py#L399) should be `2*np.sqrt(d-1)` not `2**np.sqrt(d-1)` (`**` is raising 2 to power `np.sqrt(d-1)`). The Ramanujan boun... | diff --git a/networkx/generators/expanders.py b/networkx/generators/expanders.py
index fbf003246..33b2887d9 100644
--- a/networkx/generators/expanders.py
+++ b/networkx/generators/expanders.py
@@ -396,7 +396,7 @@ def is_regular_expander(G, *, epsilon=0):
lambda2 = min(lams)
# Use bool() to convert numpy sca... |
networkx__networkx-7928 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"networkx/algorithms/centrality/betweenness.py:betweenness_centrality",
"networkx/algorithms/centrality/betweenness.py:_rescale"
],
"edited_modules": [
"networkx/algorithms/ce... | networkx/networkx | f02879d8bd86e7634c384d896e356d02611bcb26 | cytoscape JSON is not valid
The cytoscape JSON exporter does not export valid JSON.
### Current Behavior
The `networkx.cytoscape_data` function serializes a dictionary into a string, using regular Python string serialization.
However, this uses:
- single quote for strings,
- raw values for booleans, thus with an ... | diff --git a/networkx/algorithms/centrality/betweenness.py b/networkx/algorithms/centrality/betweenness.py
index 42e09771d..df8f21d10 100644
--- a/networkx/algorithms/centrality/betweenness.py
+++ b/networkx/algorithms/centrality/betweenness.py
@@ -127,6 +127,12 @@ def betweenness_centrality(
https://doi.org/10... |
neuroinformatics-unit__movement-243 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/compute_kinematics.py"
},
{
"changes": {
"added_entities": [
"movement/utils/vector.py:compute_norm",
"movement/utils/v... | neuroinformatics-unit/movement | 9ba430212c5b9faa0e1dc72ada493666e54c4c1b | Add norm function to the vector utils
**Is your feature request related to a problem? Please describe.**
We often need to get the magnitude of a vector.
**Describe the solution you'd like**
A `norm()` utility function that would function similar to existing `cart2pol` and `pol2cart` utilites.
This can facilitat... | diff --git a/examples/compute_kinematics.py b/examples/compute_kinematics.py
index 1ab2731..b3fefd4 100644
--- a/examples/compute_kinematics.py
+++ b/examples/compute_kinematics.py
@@ -10,14 +10,13 @@ visualise the results.
# Imports
# -------
-import numpy as np
-
# For interactive plots: install ipympl with `pip... |
neuroinformatics-unit__movement-270 | [
{
"changes": {
"added_entities": [
"movement/analysis/kinematics.py:_compute_approximate_time_derivative"
],
"added_modules": [
"movement/analysis/kinematics.py:_compute_approximate_time_derivative"
],
"edited_entities": [
"movement/analysis/kinematics.py:co... | neuroinformatics-unit/movement | a17e099d695d59de023373366f4d61138d448129 | Remove equidistant time-spacing assumption in computing approximate derivative
Currently when computing approximate derivatives, we assume equidistant time-spacing with a fixed `dt`:
https://github.com/neuroinformatics-unit/movement/blob/e7ccfe50f65b38dc1a05fc78e1a324df808d6198/movement/analysis/kinematics.py#L105-L1... | diff --git a/movement/analysis/kinematics.py b/movement/analysis/kinematics.py
index ed826cc..15375a5 100644
--- a/movement/analysis/kinematics.py
+++ b/movement/analysis/kinematics.py
@@ -1,6 +1,5 @@
"""Compute kinematic variables like velocity and acceleration."""
-import numpy as np
import xarray as xr
from m... |
neuroinformatics-unit__movement-278 | [
{
"changes": {
"added_entities": [
"movement/kinematics.py:_cdist",
"movement/kinematics.py:compute_pairwise_distances",
"movement/kinematics.py:_validate_labels_dimension"
],
"added_modules": [
"movement/kinematics.py:_cdist",
"movement/kinematics.py:co... | neuroinformatics-unit/movement | b10896f00258852c2719c4e5bf493677fc6d6edd | Compute pairwise distances
A few metrics to consider
- distances between 2 keypoints (within each individual, e.g. `dist_snout_rightear` for each individual)
- distances between 2 individuals (across all pairs of the same keypoints, e.g. `dist_individual1_individual2` contains snout-to-snout, rightear-to-rightear, ta... | diff --git a/movement/kinematics.py b/movement/kinematics.py
index 17126d3..a6e0b0b 100644
--- a/movement/kinematics.py
+++ b/movement/kinematics.py
@@ -1,9 +1,11 @@
"""Compute kinematic variables like velocity and acceleration."""
+import itertools
from typing import Literal
import numpy as np
import xarray as... |
neuroinformatics-unit__movement-280 | [
{
"changes": {
"added_entities": [
"movement/kinematics.py:compute_speed",
"movement/kinematics.py:compute_path_length",
"movement/kinematics.py:_warn_about_nan_proportion",
"movement/kinematics.py:_compute_scaled_path_length"
],
"added_modules": [
"move... | neuroinformatics-unit/movement | ca4daf2299141d5f69b1d2ab47c2ef58300cfc9c | Consider adding a distance and speed property to accessor
From the kinematics tutorial PR review:
We could add a "distance" property in our accessor to access directly the distance travelled, e.g:
```python
distance_travelled = ds.move.distance
```
Similarly with speed. | diff --git a/movement/kinematics.py b/movement/kinematics.py
index a6e0b0b..12e1514 100644
--- a/movement/kinematics.py
+++ b/movement/kinematics.py
@@ -7,7 +7,8 @@ import numpy as np
import xarray as xr
from scipy.spatial.distance import cdist
-from movement.utils.logging import log_error
+from movement.utils.logg... |
neuroinformatics-unit__movement-303 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"movement/io/load_bboxes.py:_numpy_arrays_from_via_tracks_file"
],
"edited_modules": [
"movement/io/load_bboxes.py:_numpy_arrays_from_via_tracks_file"
]
},
"file": "move... | neuroinformatics-unit/movement | f4f46dfc48dd1dde5959b01fb0a17fad93070ae9 | Fix centroid imported from VIA file into bboxes dataset
**Is your feature request related to a problem? Please describe.**
We talk about the centroid position of the bboxes in the docs, but what we are importing is actually the top left corner of the bounding box.
**Describe the solution you'd like**
Transform the... | diff --git a/movement/io/load_bboxes.py b/movement/io/load_bboxes.py
index 6971de0..8550a2e 100644
--- a/movement/io/load_bboxes.py
+++ b/movement/io/load_bboxes.py
@@ -402,6 +402,11 @@ def _numpy_arrays_from_via_tracks_file(file_path: Path) -> dict:
array_dict[key] = np.stack(list_arrays, axis=1).squeeze()
... |
neuroinformatics-unit__movement-351 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/source/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"movement/io/load... | neuroinformatics-unit/movement | f7539b99b8ee90db45a341feb6d537cc89b9eeeb | Reorder dimensions to start with space and time
**Is your feature request related to a problem? Please describe.**
In our current [dataset structure](http://127.0.0.1:3000/docs/build/html/getting_started/movement_dataset.html) the order of `xarray` dimensions is: `time`, `individuals`, `keypoints`, `space`.
This is... | diff --git a/docs/source/conf.py b/docs/source/conf.py
index 5d8414d..58fb1b2 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -110,7 +110,7 @@ sphinx_gallery_conf = {
"dependencies": ["environment.yml"],
},
"reference_url": {"movement": None},
- "default_thumb_file": "source/_static/... |
neuroinformatics-unit__movement-432 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"movement/utils/vector.py:compute_signed_angle_2d"
],
"edited_modules": [
"movement/utils/vector.py:compute_signed_angle_2d"
]
},
"file": "movement/utils/vector.py"
}
... | neuroinformatics-unit/movement | 470cf6aadc301ca8c47020fef570b0cebe0f5c03 | compute_forward_vector_angle throws IndexError
**Describe the bug**
Calling the `compute_forward_vector_angle` on some "normal" movement datasets (e.g. our sample data) leads to an `IndexError`.
<details>
<summary>Expand to see the Traceback</summary>
```python
--------------------------------------------------------... | diff --git a/movement/utils/vector.py b/movement/utils/vector.py
index 965d269..16beb38 100644
--- a/movement/utils/vector.py
+++ b/movement/utils/vector.py
@@ -254,7 +254,7 @@ def compute_signed_angle_2d(
angles = np.arctan2(cross, dot)
# arctan2 returns values in [-pi, pi].
# We need to map -pi angles ... |
neurostuff__PyMARE-104 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pymare/estimators/combination.py:CombinationTest.fit"
],
"edited_modules": [
"pymare/estimators/combination.py:CombinationTest"
]
},
"file": "pymare/estimators/combinat... | neurostuff/PyMARE | 541894e8b50ac9ec1b8d746d71397ced961bc1e0 | Results objects break if user called fit() rather than fit_dataset()
The various results classes all currently require access to the estimator's last-fitted `Dataset`, which won't exist now following the API change to allow `fit()` to be called with numpy arrays. The solution is to either implicitly create and store a ... | diff --git a/pymare/estimators/combination.py b/pymare/estimators/combination.py
index 8a8d6ce..f2ffabc 100644
--- a/pymare/estimators/combination.py
+++ b/pymare/estimators/combination.py
@@ -36,6 +36,9 @@ class CombinationTest(BaseEstimator):
def fit(self, z, *args, **kwargs):
"""Fit the estimator to ... |
neurostuff__PyMARE-106 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pymare/core.py:Dataset.__init__"
],
"edited_modules": [
"pymare/core.py:Dataset"
]
},
"file": "pymare/core.py"
},
{
"changes": {
"added_entities": [
... | neurostuff/PyMARE | 0a9984060b912c241633d74c9d5a91779a0a71f5 | Datasets do not check input array shapes/sizes
To reproduce the problem, use the following code
```python
from pymare import core, estimators
y = [
[2, 4, 6], # estimates for first study's three datasets
[3, 2, 1], # estimates for second study's three datasets
]
v = [
[100, 100, 100], # estim... | diff --git a/.zenodo.json b/.zenodo.json
index f524e90..00d9ae2 100644
--- a/.zenodo.json
+++ b/.zenodo.json
@@ -10,6 +10,11 @@
"affiliation": "Florida International University",
"orcid": "0000-0001-9813-3167"
},
+ {
+ "name": "Peraza, Julio A.",
+ "affiliation": "Florida International U... |
newAM__monitorcontrol-149 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"monitorcontrol/monitorcontrol.py:_parse_capabilities"
],
"edited_modules": [
"monitorcontrol/monitorcontrol.py:_parse_capabilities"
]
},
"file": "monitorcontrol/monitor... | newAM/monitorcontrol | 5ebfc25c85be4b17e3992dce8f1f59e98cca861f | ValueError: 33 is not a valid InputSource
* Monitor manufacturer and model number: MSI Optix MAG342CQRV
* Input source (HDMI, VGA, display port, ect.): HDMI1
* Output device (video card, discrete graphics, ect.): 6800XT
* Operating system: Windows 10 21H1 19043.1466
* Python version: 3.9.9
* monitorcontrol version... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7858c84..4992caa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ as of version 2.1.1.
### Changed
- Updated pyudev from 0.22 to 0.23.
+- Changed `get_vcp_capabilities()["inputs"]` from `List[str]` to `Union[InputSource, int]`.
### Removed
- Removed s... |
newAM__monitorcontrol-20 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"monitorcontrol/vcp/vcp_linux.py:LinuxVCP.set_vcp_feature",
"monitorcontrol/vcp/vcp_linux.py:LinuxVCP.get_vcp_feature",
"monitorcontrol/vcp/vcp_linux.py:LinuxVCP.get_vcp_capabilities",
... | newAM/monitorcontrol | 2ea0f8b04cd230be755618a6283d5c0031f62919 | Severity of VCPIOError errors
Due to high level of errors severity it is impossible to use monitorcontrol (VCPIOError exception thrown) with monitors which do not follow the DDC/CI standard e.g. Philips 223V monitors returns corrupted data i.e. incorrect checksum and/or wrong length, despite that it is possible to cont... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc9a019..1e08c78 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
as of version 2.1.1.
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.