diff --git a/src/framework/pybind_casts.hpp b/src/framework/pybind_casts.hpp index 291b817a01..de59f6de37 100644 --- a/src/framework/pybind_casts.hpp +++ b/src/framework/pybind_casts.hpp @@ -33,8 +33,8 @@ template struct type_caster>{ if(py_matrix.ndim() != 2){ throw std::invalid_argument(std::string("Python: invalid matrix (empty array).")); } - size_t ncols = py_matrix.shape(0); - size_t nrows = py_matrix.shape(1); + size_t nrows = py_matrix.shape(0); + size_t ncols = py_matrix.shape(1); // Matrix looks ok, now we parse it auto raw_mat = py_matrix.template unchecked<2>(); if(c_order){