diff options
author | Evan Shelhamer <shelhamer@imaginarynumber.net> | 2014-01-23 09:10:44 -0800 |
---|---|---|
committer | Evan Shelhamer <shelhamer@imaginarynumber.net> | 2014-02-14 15:33:00 -0800 |
commit | 73c10a1ae12b8b1e328c19b8f6080cad3105e790 (patch) | |
tree | 2e7929a481d1dc6242626c198649ebe7141febd6 /python | |
parent | 89a0e8ebb2b1f704e72ac9655aa920e906492981 (diff) | |
download | caffeonacl-73c10a1ae12b8b1e328c19b8f6080cad3105e790.tar.gz caffeonacl-73c10a1ae12b8b1e328c19b8f6080cad3105e790.tar.bz2 caffeonacl-73c10a1ae12b8b1e328c19b8f6080cad3105e790.zip |
add macro for numpy < 1.7
as suggested by @longjon
https://github.com/BVLC/caffe/issues/44#issuecomment-32832810
Diffstat (limited to 'python')
-rw-r--r-- | python/caffe/pycaffe.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/caffe/pycaffe.cpp b/python/caffe/pycaffe.cpp index 2bfae9e2..1beec163 100644 --- a/python/caffe/pycaffe.cpp +++ b/python/caffe/pycaffe.cpp @@ -10,9 +10,11 @@ #include <numpy/arrayobject.h> #include "caffe/caffe.hpp" -// Temporary solution for numpy < 1.7 versions: old macro. +// Temporary solution for numpy < 1.7 versions: old macro, no promises. +// You're strongly advised to upgrade to >= 1.7. #ifndef NPY_ARRAY_C_CONTIGUOUS #define NPY_ARRAY_C_CONTIGUOUS NPY_C_CONTIGUOUS +#define PyArray_SetBaseObject(arr, x) (PyArray_BASE(arr) = (x)) #endif |