We should expect that [1, 3, 5, 7, 9] is added as a row, but currently [1, 2, 3, 4, 5] is added instead.
The issue is in highs_bindings.cpp where we use py::array_t<T>. I've changed this to py::array_t<T, py::array::c_style | py::array::forcecast> instead. This will ensure that the underlying raw data is contiguous and of correct type.
Adding issue for visibility, although I've already fixed the code in #1891.
Consider the following:
We should expect that
[1, 3, 5, 7, 9]
is added as a row, but currently[1, 2, 3, 4, 5]
is added instead.The issue is in
highs_bindings.cpp
where we usepy::array_t<T>
. I've changed this topy::array_t<T, py::array::c_style | py::array::forcecast>
instead. This will ensure that the underlying raw data is contiguous and of correct type.