From b3189504fed72cf255efd844188883c787a3005b Mon Sep 17 00:00:00 2001 From: Alexander Dielen <alexander.dielen@rwth-aachen.de> Date: Tue, 10 Jul 2018 13:55:23 +0200 Subject: [PATCH] allow scalars in property_array functions (fixes #22) --- src/MeshTypes.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MeshTypes.hh b/src/MeshTypes.hh index e2f191c..3561776 100644 --- a/src/MeshTypes.hh +++ b/src/MeshTypes.hh @@ -140,7 +140,7 @@ public: PyErr_SetString(PyExc_RuntimeError, "Array shapes do not match."); throw py::error_already_set(); } - std::copy(arr.data(0), arr.data(0) + size, &data[size * i]); + std::copy(arr.data(), arr.data() + size, &data[size * i]); } return py::array_t<double>(shape, strides, data, base); -- GitLab