Skip to content

Commit e378427

Browse files
committed
numpy: fix constness bug
1 parent b95cb9b commit e378427

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/eigenpy/numpy-allocator.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ namespace eigenpy
4646
NPY_ARRAY_MEMORY_CONTIGUOUS | NPY_ARRAY_ALIGNED,
4747
NULL);
4848

49-
5049
return pyArray;
5150
}
5251
};
@@ -63,11 +62,10 @@ namespace eigenpy
6362

6463
PyArrayObject * pyArray = (PyArrayObject*) PyArray_New(&PyArray_Type, nd, shape,
6564
NumpyEquivalentType<Scalar>::type_code, NULL,
66-
mat.data(), 0,
65+
const_cast<SimilarMatrixType &>(mat.derived()).data(), 0,
6766
NPY_ARRAY_MEMORY_CONTIGUOUS_RO | NPY_ARRAY_ALIGNED,
6867
NULL);
6968

70-
7169
return pyArray;
7270
}
7371
};

0 commit comments

Comments
 (0)