Skip to content

Commit

Permalink
allow scalars in property_array functions (fixes #22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Dielen committed Jul 10, 2018
1 parent ed43570 commit b318950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MeshTypes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b318950

Please sign in to comment.