Use NumPy 1.7 API for pybind11#59
Conversation
| PyObject* input_array = PyArray_FROM_OTF(input,detail::NumpyTraits<TArgument>::getCode(), | ||
| NPY_ALIGNED); | ||
| PyArrayObject* input_array = PyArray_FROM_OTF(input,detail::NumpyTraits<TArgument>::getCode(), | ||
| NPY_ARRAY_ALIGNED); |
There was a problem hiding this comment.
Reindent second line, please.
| // check whether the size is correct if it's static | ||
| if (N == 2) { | ||
| if (Rows_ != Eigen::Dynamic && PyArray_DIM(p.get(), 0) != Rows_) { | ||
| if (Rows_ != Eigen::Dynamic && PyArray_DIM(reinterpret_cast<PyArrayObject*>(p.get()), 0) != Rows_) { |
There was a problem hiding this comment.
Looks like it'd be good to use a temporary PyArrayObject* variable here, too.
|
If the user does not define If so, maybe the best way to handle this is to put a Ultimately, I'd still like to switch all of this code to use the pybind11 NumPy API directly and avoid all the NumPy imports, but that's a much bigger change that will require extensive testing and probably adding some things upstream in pybind11. |
|
Yes, that is the case. I added a warning as requested. |
No description provided.