From 1b748668eecfd22e69ac7fa70356c8cdf917ad96 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Tue, 3 Feb 2015 15:06:27 +1100 Subject: [PATCH] Move package to skimage.future.graph --- skimage/future/__init__.py | 0 skimage/future/graph/__init__.py | 12 ++++++++++++ skimage/future/{ => graph}/_ncut.py | 0 skimage/future/{ => graph}/_ncut_cy.pyx | 0 skimage/future/{ => graph}/graph_cut.py | 0 skimage/future/{ => graph}/graph_merge.py | 0 skimage/future/{ => graph}/rag.py | 2 +- skimage/future/{ => graph}/tests/test_rag.py | 0 skimage/graph/__init__.py | 4 ---- 9 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 skimage/future/__init__.py create mode 100644 skimage/future/graph/__init__.py rename skimage/future/{ => graph}/_ncut.py (100%) rename skimage/future/{ => graph}/_ncut_cy.pyx (100%) rename skimage/future/{ => graph}/graph_cut.py (100%) rename skimage/future/{ => graph}/graph_merge.py (100%) rename skimage/future/{ => graph}/rag.py (99%) rename skimage/future/{ => graph}/tests/test_rag.py (100%) diff --git a/skimage/future/__init__.py b/skimage/future/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/skimage/future/graph/__init__.py b/skimage/future/graph/__init__.py new file mode 100644 index 00000000..6b7e0aaa --- /dev/null +++ b/skimage/future/graph/__init__.py @@ -0,0 +1,12 @@ +from .graph_cut import cut_threshold, cut_normalized +from .rag import rag_mean_color, RAG, draw_rag +from .graph_merge import merge_hierarchical +ncut = cut_normalized + +__all__ = ['rag_mean_color', + 'cut_threshold', + 'cut_normalized', + 'ncut', + 'draw_rag', + 'merge_hierarchical', + 'RAG'] diff --git a/skimage/future/_ncut.py b/skimage/future/graph/_ncut.py similarity index 100% rename from skimage/future/_ncut.py rename to skimage/future/graph/_ncut.py diff --git a/skimage/future/_ncut_cy.pyx b/skimage/future/graph/_ncut_cy.pyx similarity index 100% rename from skimage/future/_ncut_cy.pyx rename to skimage/future/graph/_ncut_cy.pyx diff --git a/skimage/future/graph_cut.py b/skimage/future/graph/graph_cut.py similarity index 100% rename from skimage/future/graph_cut.py rename to skimage/future/graph/graph_cut.py diff --git a/skimage/future/graph_merge.py b/skimage/future/graph/graph_merge.py similarity index 100% rename from skimage/future/graph_merge.py rename to skimage/future/graph/graph_merge.py diff --git a/skimage/future/rag.py b/skimage/future/graph/rag.py similarity index 99% rename from skimage/future/rag.py rename to skimage/future/graph/rag.py index 120e9e91..e3d52875 100644 --- a/skimage/future/rag.py +++ b/skimage/future/graph/rag.py @@ -14,7 +14,7 @@ import numpy as np from scipy.ndimage import filters from scipy import ndimage as nd import math -from .. import draw, measure, segmentation, util, color +from ... import draw, measure, segmentation, util, color try: from matplotlib import colors from matplotlib import cm diff --git a/skimage/future/tests/test_rag.py b/skimage/future/graph/tests/test_rag.py similarity index 100% rename from skimage/future/tests/test_rag.py rename to skimage/future/graph/tests/test_rag.py diff --git a/skimage/graph/__init__.py b/skimage/graph/__init__.py index f93708c9..89260f1f 100644 --- a/skimage/graph/__init__.py +++ b/skimage/graph/__init__.py @@ -1,9 +1,5 @@ from .spath import shortest_path from .mcp import MCP, MCP_Geometric, MCP_Connect, MCP_Flexible, route_through_array -from .graph_cut import cut_threshold, cut_normalized -from .rag import rag_mean_color, RAG, draw_rag -from .graph_merge import merge_hierarchical -ncut = cut_normalized __all__ = ['shortest_path',