[Python-modules-commits] r22502 - in packages/python-networkx/trunk/debian (5 files)
morph at users.alioth.debian.org
morph at users.alioth.debian.org
Sat Aug 11 10:06:46 UTC 2012
Date: Saturday, August 11, 2012 @ 10:06:45
Author: morph
Revision: 22502
* debian/patches/changeset_*
- removed, included upstream
Modified:
packages/python-networkx/trunk/debian/changelog
packages/python-networkx/trunk/debian/patches/series
Deleted:
packages/python-networkx/trunk/debian/patches/changeset_8960521b5ae4897bdbac4ff49525d8b37bff88d2.diff
packages/python-networkx/trunk/debian/patches/changeset_9ebe087b8bbcdeee3051e07cacd05fa07436c16e.diff
packages/python-networkx/trunk/debian/patches/changeset_fed4cb6e78dc7047c06522b0418ef5b0d8197290.diff
Modified: packages/python-networkx/trunk/debian/changelog
===================================================================
--- packages/python-networkx/trunk/debian/changelog 2012-08-11 09:55:01 UTC (rev 22501)
+++ packages/python-networkx/trunk/debian/changelog 2012-08-11 10:06:45 UTC (rev 22502)
@@ -1,8 +1,10 @@
python-networkx (1.7-1) UNRELEASED; urgency=low
* New upstream release
+ * debian/patches/changeset_*
+ - removed, included upstream
- -- Sandro Tosi <morph at debian.org> Sat, 11 Aug 2012 11:54:51 +0200
+ -- Sandro Tosi <morph at debian.org> Sat, 11 Aug 2012 12:06:30 +0200
python-networkx (1.7~rc1-3) unstable; urgency=low
Deleted: packages/python-networkx/trunk/debian/patches/changeset_8960521b5ae4897bdbac4ff49525d8b37bff88d2.diff
===================================================================
--- packages/python-networkx/trunk/debian/patches/changeset_8960521b5ae4897bdbac4ff49525d8b37bff88d2.diff 2012-08-11 09:55:01 UTC (rev 22501)
+++ packages/python-networkx/trunk/debian/patches/changeset_8960521b5ae4897bdbac4ff49525d8b37bff88d2.diff 2012-08-11 10:06:45 UTC (rev 22502)
@@ -1,43 +0,0 @@
-Description: Handle empty graph (all zero matrix) and null graph (raise exception) in to_scipy_sparse_matrix.
-Origin: https://networkx.lanl.gov/trac/changeset/8960521b5ae4897bdbac4ff49525d8b37bff88d2/networkx
-Index: networkx/convert.py
-===================================================================
---- python-networkx-1.7rc1.orig/networkx/convert.py (revision 2066)
-+++ python-networkx-1.7rc1/networkx/convert.py (revision 2207)
-@@ -776,11 +776,16 @@
- nodelist = G
- nlen = len(nodelist)
-+ if nlen == 0:
-+ raise nx.NetworkXError("Graph has no nodes or edges")
- index = dict(zip(set(nodelist),range(nlen)))
- if len(nodelist) != len(index):
- msg = "Ambiguous ordering: `nodelist` contained duplicates."
- raise nx.NetworkXError(msg)
-- row,col,data=zip(*((index[u],index[v],d.get(weight,1))
-- for u,v,d in G.edges(nodelist, data=True)
-- if u in index and v in index))
-+ if G.number_of_edges() == 0:
-+ row,col,data=[],[],[]
-+ else:
-+ row,col,data=zip(*((index[u],index[v],d.get(weight,1))
-+ for u,v,d in G.edges_iter(nodelist, data=True)
-+ if u in index and v in index))
- if G.is_directed():
- M = sparse.coo_matrix((data,(row,col)),shape=(nlen,nlen), dtype=dtype)
-Index: networkx/tests/test_convert_scipy.py
-===================================================================
---- python-networkx-1.7rc1.orig/networkx/tests/test_convert_scipy.py (revision 2066)
-+++ python-networkx-1.7rc1/networkx/tests/test_convert_scipy.py (revision 2207)
-@@ -160,2 +160,12 @@
- P4 = path_graph(4)
- nx.to_scipy_sparse_matrix(P4, format='any_other')
-+
-+ @raises(nx.NetworkXError)
-+ def test_null_fail(self):
-+ nx.to_scipy_sparse_matrix(nx.Graph())
-+
-+ def test_empty(self):
-+ G = nx.Graph()
-+ G.add_node(1)
-+ M = nx.to_scipy_sparse_matrix(G)
-+ np_assert_equal(M.todense(), np.matrix([[0]]))
Deleted: packages/python-networkx/trunk/debian/patches/changeset_9ebe087b8bbcdeee3051e07cacd05fa07436c16e.diff
===================================================================
--- packages/python-networkx/trunk/debian/patches/changeset_9ebe087b8bbcdeee3051e07cacd05fa07436c16e.diff 2012-08-11 09:55:01 UTC (rev 22501)
+++ packages/python-networkx/trunk/debian/patches/changeset_9ebe087b8bbcdeee3051e07cacd05fa07436c16e.diff 2012-08-11 10:06:45 UTC (rev 22502)
@@ -1,59 +0,0 @@
-From 9ebe087b8bbcdeee3051e07cacd05fa07436c16e Mon Sep 17 00:00:00 2001
-From: Aric Hagberg <aric.hagberg at gmail.com>
-Date: Fri, 29 Jun 2012 21:30:38 -0600
-Subject: [PATCH] Preserver order in G.nodes() or given in nodelist when
- converting to scipy sparse matrix. Update docs to reflect
- use of COO matrix. Addresses #737
-
----
- networkx/convert.py | 8 +++++---
- networkx/tests/test_convert_scipy.py | 8 ++++++++
- 2 files changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/networkx/convert.py b/networkx/convert.py
-index 833c754..6333b9f 100644
---- a/networkx/convert.py
-+++ b/networkx/convert.py
-@@ -745,7 +745,7 @@ def to_scipy_sparse_matrix(G, nodelist=None, dtype=None,
- When `nodelist` does not contain every node in `G`, the matrix is built
- from the subgraph of `G` that is induced by the nodes in `nodelist`.
-
-- Uses lil_matrix format. To convert to other formats specify the
-+ Uses coo_matrix format. To convert to other formats specify the
- format= keyword.
-
- Examples
-@@ -777,10 +777,12 @@ def to_scipy_sparse_matrix(G, nodelist=None, dtype=None,
- nlen = len(nodelist)
- if nlen == 0:
- raise nx.NetworkXError("Graph has no nodes or edges")
-- index = dict(zip(set(nodelist),range(nlen)))
-- if len(nodelist) != len(index):
-+
-+ if len(nodelist) != len(set(nodelist)):
- msg = "Ambiguous ordering: `nodelist` contained duplicates."
- raise nx.NetworkXError(msg)
-+
-+ index = dict(zip(nodelist,range(nlen)))
- if G.number_of_edges() == 0:
- row,col,data=[],[],[]
- else:
-diff --git a/networkx/tests/test_convert_scipy.py b/networkx/tests/test_convert_scipy.py
-index 27ab786..f90dee7 100644
---- a/networkx/tests/test_convert_scipy.py
-+++ b/networkx/tests/test_convert_scipy.py
-@@ -169,3 +169,11 @@ class TestConvertNumpy(object):
- G.add_node(1)
- M = nx.to_scipy_sparse_matrix(G)
- np_assert_equal(M.todense(), np.matrix([[0]]))
-+
-+ def test_ordering(self):
-+ G = nx.DiGraph()
-+ G.add_edge(1,2)
-+ G.add_edge(2,3)
-+ G.add_edge(3,1)
-+ M = nx.to_scipy_sparse_matrix(G,nodelist=[3,2,1])
-+ np_assert_equal(M.todense(), np.matrix([[0,0,1],[1,0,0],[0,1,0]]))
---
-1.7.10.4
-
Deleted: packages/python-networkx/trunk/debian/patches/changeset_fed4cb6e78dc7047c06522b0418ef5b0d8197290.diff
===================================================================
--- packages/python-networkx/trunk/debian/patches/changeset_fed4cb6e78dc7047c06522b0418ef5b0d8197290.diff 2012-08-11 09:55:01 UTC (rev 22501)
+++ packages/python-networkx/trunk/debian/patches/changeset_fed4cb6e78dc7047c06522b0418ef5b0d8197290.diff 2012-08-11 10:06:45 UTC (rev 22502)
@@ -1,14 +0,0 @@
-Index: networkx/algorithms/simple_paths.py
-Description: fix failing doctest in all_simple_paths()
-Origin: https://networkx.lanl.gov/trac/changeset/fed4cb6e78dc7047c06522b0418ef5b0d8197290/networkx
-===================================================================
---- python-networkx-1.7rc1.orig/networkx/algorithms/simple_paths.py (revision 2197)
-+++ python-networkx-1.7rc1/networkx/algorithms/simple_paths.py (revision 2203)
-@@ -42,5 +42,6 @@
- >>> G = nx.Graph()
- >>> G.add_path([1,2,3])
-- >>> G.add_path([1,20,30])
-+ >>> G.add_path([1,20,3])
-+ >>> paths = nx.all_simple_paths(G, source=1, target=3)
- >>> print(list(paths))
- [[1, 2, 3], [1, 20, 3]]
Modified: packages/python-networkx/trunk/debian/patches/series
===================================================================
--- packages/python-networkx/trunk/debian/patches/series 2012-08-11 09:55:01 UTC (rev 22501)
+++ packages/python-networkx/trunk/debian/patches/series 2012-08-11 10:06:45 UTC (rev 22502)
@@ -2,6 +2,3 @@
20_example_dirs_remove
30_use_local_objects.inv
40_no_setuptools_in_requires.txt
-changeset_fed4cb6e78dc7047c06522b0418ef5b0d8197290.diff
-changeset_8960521b5ae4897bdbac4ff49525d8b37bff88d2.diff
-changeset_9ebe087b8bbcdeee3051e07cacd05fa07436c16e.diff
More information about the Python-modules-commits
mailing list