From 53318c44dfcd7158b21a31346d362210c592aa7b Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Tue, 17 Jun 2014 22:36:48 +0530 Subject: [PATCH] CHanges to get Python3 working --- skimage/graph/_construct.pyx | 4 ++-- skimage/graph/rag.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/skimage/graph/_construct.pyx b/skimage/graph/_construct.pyx index c4fbb465..c3cde3b9 100644 --- a/skimage/graph/_construct.pyx +++ b/skimage/graph/_construct.pyx @@ -1,6 +1,6 @@ -import rag -cimport numpy as cnp import numpy as np +cimport numpy as cnp +import rag def construct_rag_meancolor_3d(img, arr): diff --git a/skimage/graph/rag.py b/skimage/graph/rag.py index d4ad6628..1129d4a9 100644 --- a/skimage/graph/rag.py +++ b/skimage/graph/rag.py @@ -1,6 +1,7 @@ import networkx as nx -import _construct from skimage import util +from ._construct import construct_rag_meancolor_2d +from ._construct import construct_rag_meancolor_3d class RAG(nx.Graph): @@ -80,8 +81,8 @@ def rag_meancolor(img, labels): img = util.img_as_ubyte(img) if img.ndim == 4: - return _construct.construct_rag_meancolor_3d(img, labels) + return construct_rag_meancolor_3d(img, labels) elif img.ndim == 3: - return _construct.construct_rag_meancolor_2d(img, labels) + return construct_rag_meancolor_2d(img, labels) else: raise ValueError("Image dimension not supported")