diff --git a/wrappers/gmshpy/gmshtypemaps.i b/wrappers/gmshpy/gmshtypemaps.i index 65ac1f075f819f0d1bf49321158f5cb9f08274f0..fa9ec33d24803f81975d78e6b67c8464f1525516 100644 --- a/wrappers/gmshpy/gmshtypemaps.i +++ b/wrappers/gmshpy/gmshtypemaps.i @@ -102,15 +102,6 @@ delete [](double*)PyCapsule_GetPointer(capsule, NULL); } %#endif - PyObject *constFullMatrix2PyArray(const fullMatrix<double> &fm) - { - npy_intp dims[2] = {fm.size1(), fm.size2()}; - double *data = (double*) fm.getDataPtr(); - // do not copy data - PyObject *array = PyArray_New(&PyArray_Type, dims[1] == 1 ? 1 : 2, dims, NPY_DOUBLE, NULL, (void*)data, 0, NPY_ARRAY_F_CONTIGUOUS, NULL); - PyArray_UpdateFlags((PyArrayObject*)array, NPY_ARRAY_ALIGNED); - return array; - } PyObject *fullMatrix2PyArray(fullMatrix<double> &fm) { npy_intp dims[2] = {fm.size1(), fm.size2()}; @@ -185,10 +176,6 @@ %typemap(out, fragment="fullMatrixConversion") fullMatrix<double> { $result = fullMatrix2PyArray($1); } - -%typemap(out, fragment="fullMatrixConversion") const fullMatrix<double>& { - $result = constFullMatrix2PyArray(*($1)); -} #endif