Export to GitHub

wrapitk - issue #9

Automatic detection of numpy/numerical in PyBuffer cmake script


Posted on Jan 14, 2009 by Massive Bird

This commit:

http://code.google.com/p/wrapitk/source/detail?r=186

produces this error:

CMake Error at CMakeLists.txt:13 (WRAP_LIBRARY): Unknown CMake command "WRAP_LIBRARY". CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: PYTHON_NUMARRAY_INCLUDE_DIR used as include directory in directory /media/USB-WD-1/dev-ubuntu/itk/WrapITK/ExternalProjects/PyBuffer

As ${NUMPY_PATH} is not set, the hard coded

/usr/share/pyshared/numpy/core/include/numpy/

path is the default on linux, but it seems it's not that standard.

Perhaps more important than automatically detecting the header file is to prompt the user about the choice between numerric and numpy as they are different libraries with different performances.

It may not be easy to automate numpy header detection,

Comment #1

Posted on Jan 15, 2009 by Helpful Hippo

numpy.get_include() is the standard method to find numpy headers. Perhaps your problem comes from the non detected WrapITK dir?

Also, numeric and numarray are both older libraries which should be replaced by numpy. I don't think we should care about choosing one or the other.

Comment #2

Posted on Jan 15, 2009 by Massive Bird

You're right, wrapitk dir was not found and it didn't warn me about it. Now numpy include path is well detected!

Comment #3

Posted on Jan 15, 2009 by Massive Bird

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium