From 18f5f50daba20de6c1ccc9fbe449c7859f41c1ba Mon Sep 17 00:00:00 2001 From: Agis Kounelis Date: Thu, 5 Dec 2024 03:37:00 +0000 Subject: [PATCH] Fix attempt --- tiledb/cc/query.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tiledb/cc/query.cc b/tiledb/cc/query.cc index b8e48aeb96..f13ffcd4c6 100644 --- a/tiledb/cc/query.cc +++ b/tiledb/cc/query.cc @@ -74,14 +74,13 @@ void init_query(py::module &m) { .def("set_data_buffer", [](Query &q, std::string name, py::array a, uint64_t nelements) { - QueryExperimental::set_data_buffer(q, name, a.mutable_data(), - nelements); + QueryExperimental::set_data_buffer( + q, name, const_cast(a.data()), nelements); }) .def("set_offsets_buffer", [](Query &q, std::string name, py::array a, uint64_t nelements) { - q.set_offsets_buffer( - name, static_cast(a.mutable_data()), nelements); + q.set_offsets_buffer(name, (uint64_t *)(a.data()), nelements); }) .def("set_subarray", @@ -91,8 +90,7 @@ void init_query(py::module &m) { .def("set_validity_buffer", [](Query &q, std::string name, py::array a, uint64_t nelements) { - q.set_validity_buffer( - name, static_cast(a.mutable_data()), nelements); + q.set_validity_buffer(name, (uint8_t *)(a.data()), nelements); }) .def("_submit", &Query::submit, py::call_guard())