File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -146,26 +146,34 @@ namespace eigenpy
146146
147147 if (!PyArray_Check (obj_ptr))
148148 {
149+ #ifndef NDEBUG
149150 std::cerr << " The python object is not a numpy array." << std::endl;
151+ #endif
150152 return 0 ;
151153 }
152154
153155 if (PyArray_NDIM (obj_ptr) != 2 )
154156 if ( (PyArray_NDIM (obj_ptr) !=1 ) || (! MatType::IsVectorAtCompileTime) )
155157 {
158+ #ifndef NDEBUG
156159 std::cerr << " The number of dimension of the object is not correct." << std::endl;
160+ #endif
157161 return 0 ;
158162 }
159163
160164 if ((PyArray_ObjectType (obj_ptr, 0 )) != NumpyEquivalentType<T>::type_code)
161165 {
166+ #ifndef NDEBUG
162167 std::cerr << " The internal type as no Eigen equivalent." << std::endl;
168+ #endif
163169 return 0 ;
164170 }
165171
166172 if (!(PyArray_FLAGS (obj_ptr) & NPY_ALIGNED))
167173 {
174+ #ifndef NDEBUG
168175 std::cerr << " NPY non-aligned matrices are not implemented." << std::endl;
176+ #endif
169177 return 0 ;
170178 }
171179
You can’t perform that action at this time.
0 commit comments