Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QH6228 Bug fix - remove offset from coords #873

Merged

Conversation

jmetz
Copy link
Contributor

@jmetz jmetz commented Jan 31, 2014

Fixes: #871

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.57%) when pulling add4b51 on jezmpez:convex_hull_image_qhull_precision_fix into 73bf701 on scikit-image:master.

@jni
Copy link
Member

jni commented Feb 1, 2014

As I recall, this approach also fixed the bug I found ~6 months ago (#672).

@jmetz, can you add your failing test case to the tests in test_convex_hull.py, and make sure they pass on your machine?

@stefanv, the decreased coverage appears to indicate that the convex hull tests are skipped on Travis. Is there a reason for this?

@jmetz
Copy link
Contributor Author

jmetz commented Feb 1, 2014

@jni - just having a minor compile issue while trying to run my additional testing; am I missing something simple..?
python setup.py build

gives

... 
building 'skimage.filter.rank.generic_cy' extension
compiling C sources
C compiler: x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC

compile options: '-I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'
x86_64-linux-gnu-gcc: rank/generic_cy.c
x86_64-linux-gnu-gcc: error: rank/generic_cy.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
x86_64-linux-gnu-gcc: error: rank/generic_cy.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: Command "x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c rank/generic_cy.c -o build/temp.linux-x86_64-2.7/rank/generic_cy.o" failed with exit status 4

@jmetz
Copy link
Contributor Author

jmetz commented Feb 1, 2014

@jni - OK I worked around that by manually calling cython on most of the pyx files in skimage/filters/rank/ - did something get broken in the setup process?

Also I can confirm that my workaround also fixed the other previously failing test (test_pathological_qhull_example) .

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.57%) when pulling 920c3ef on jmetz:convex_hull_image_qhull_precision_fix into 73bf701 on scikit-image:master.

@@ -54,6 +54,10 @@ def convex_hull_image(image):
raise ImportError('Could not import scipy.spatial, only available in '
'scipy >= 0.9.')

# Subtract offset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace

@JDWarner
Copy link
Contributor

JDWarner commented Feb 1, 2014

I noticed a few very minor style issues about unnecessary whitespace; I think I noted them all. Many editors can be set to automatically trim all trailing whitespace on saves, to avoid this in the future.

Travis appears to be compiling and running the new file correctly, so I think this is ready to go once that whitespace gets trimmed!

@jmetz
Copy link
Contributor Author

jmetz commented Feb 1, 2014

Thanks for the catch @JDWarner - I modified my vimrc to remove trailing whitespaces on save and updated the corresponding edits accordingly.
Did I get them all?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.57%) when pulling 0136fd5 on jmetz:convex_hull_image_qhull_precision_fix into 73bf701 on scikit-image:master.

@jni
Copy link
Member

jni commented Feb 2, 2014

@jmetz @stefanv @ahojnnes I also can't get the cython files to compile automatically. I believe this was introduced with the "cythonize" syntax. What needs to be changed in our setup to get the files to be compiled with e.g. python setup.py install or make all?

151, 152, 153, 154, 147, 148, 149, 150, 151, 152, 153, 148, 149,
150, 151, 152, 149, 150, 151, 150]))
image = np.zeros((1392, 1040), dtype=bool)
image[ nonzeros ] = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8: image[nonzeros]

@jni
Copy link
Member

jni commented Feb 2, 2014

@jmetz one final style comment, then it's in as far as I'm concerned!

@jmetz
Copy link
Contributor Author

jmetz commented Feb 2, 2014

Thanks @jni and @JDWarner for the style comments.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling ef779d1 on jmetz:convex_hull_image_qhull_precision_fix into 73bf701 on scikit-image:master.

jni added a commit that referenced this pull request Feb 2, 2014
QH6228 Bug fix - remove offset from coords

Fixes issue #871.
@jni jni merged commit b45e8c9 into scikit-image:master Feb 2, 2014
@jni
Copy link
Member

jni commented Feb 2, 2014

@stefanv, I made a call to ignore the Travis error since it was obviously ancillary to the actual build. The previous build was fine, and this last commit only changed spacing between parentheses. Let me know if you'd rather I restart builds even in such cases.

@stefanv
Copy link
Member

stefanv commented Feb 2, 2014

@jni Master looks happy, so I'm happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in convex_hull_image: QH6228 Qhull internal error (qh_findbestlower)
5 participants