sknw icon indicating copy to clipboard operation
sknw copied to clipboard

I run the sample code, but graph.edges()=[], and the horse figure only shows 1 node 0 edge.

Open 1912351430 opened this issue 5 years ago • 6 comments

I run the sample code, but graph.edges()=[], and the horse figure only shows 1 node 0 edge.

image

and i have a lot of numba warning like:

NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "mark" failed type inference due to: Untyped global name 'neighbors': cannot determine Numba type of <class 'function'>

File "C:\Users\zhuyf_6837\AppData\Local\Programs\Python\Python37\lib\site-packages\sknw\sknw.py", line 18: def mark(img): # mark the array use (0, 1, 2) nbs = neighbors(img.shape)

does this has anything to do with incompatible version? I use Python 3.7.3, and run the sample code in pycharm, all related library( skimage,sknw,numba…… ) were installed in pycharm. I am an art student, and very new to python, sorry if my question sounds idiotic……

1912351430 avatar May 13 '20 10:05 1912351430

OK, I later tried the source code and it works perfectly. but the sknw I got from "pip install sknw" still doesn't work…

1912351430 avatar May 14 '20 02:05 1912351430

oh, I did not update the pypi for a long time. I would do it later.

yxdragon avatar May 14 '20 05:05 yxdragon

Thanks. Very useful  library! Nice job!

---Original--- From: "Yan xiaolong"<[email protected]> Date: Thu, May 14, 2020 13:41 PM To: "Image-Py/sknw"<[email protected]>; Cc: "Author"<[email protected]>;"1912351430"<[email protected]>; Subject: Re: [Image-Py/sknw] I run the sample code, but graph.edges()=[], and the horse figure only shows 1 node 0 edge. (#6)

oh, I did not update the pypi for a long time. I would do it later.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

1912351430 avatar May 14 '20 07:05 1912351430

I have the same problem, but neither this repository nor the release from PyPi are working currently. Removing the @jit marks however seems to do the trick, so this is probably an issue with numba.

Flynamic avatar Jun 20 '20 17:06 Flynamic

@Flynamic updated on pypi, have a try!

yxdragon avatar Jun 20 '20 23:06 yxdragon

Thank you, works like a charm!

Flynamic avatar Aug 23 '20 18:08 Flynamic