@@ -173,12 +173,22 @@ void init_type_erased_module(py::module_& m) {
173173 py::keep_alive<1 , 2 >() // FeatureVectorArray should keep ctx alive.
174174 )
175175 .def (
176- py::init<
177- const tiledb::Context&,
178- const std::string&,
179- const std::string&>(),
180- py::keep_alive<1 , 2 >() // FeatureVectorArray should keep ctx alive.
181- )
176+ " __init__" ,
177+ [](FeatureVectorArray& instance,
178+ const tiledb::Context& ctx,
179+ const std::string& uri,
180+ const std::string& ids_uri,
181+ size_t num_vectors,
182+ size_t timestamp) {
183+ new (&instance)
184+ FeatureVectorArray (ctx, uri, ids_uri, num_vectors, timestamp);
185+ },
186+ py::keep_alive<1 , 2 >(), // FeatureVectorArray should keep ctx alive.
187+ py::arg (" ctx" ),
188+ py::arg (" uri" ),
189+ py::arg (" ids_uri" ) = " " ,
190+ py::arg (" num_vectors" ) = 0 ,
191+ py::arg (" timestamp" ) = 0 )
182192 .def (py::init<size_t , size_t , const std::string&, const std::string&>())
183193 .def (" dimension" , &FeatureVectorArray::dimension)
184194 .def (" num_vectors" , &FeatureVectorArray::num_vectors)
@@ -261,9 +271,17 @@ void init_type_erased_module(py::module_& m) {
261271
262272 py::class_<IndexVamana>(m, " IndexVamana" )
263273 .def (
264- py::init<const tiledb::Context&, const std::string&>(),
265- py::keep_alive<1 , 2 >() // IndexVamana should keep ctx alive.
266- )
274+ " __init__" ,
275+ [](IndexVamana& instance,
276+ const tiledb::Context& ctx,
277+ const std::string& group_uri,
278+ size_t timestamp) {
279+ new (&instance) IndexVamana (ctx, group_uri, timestamp);
280+ },
281+ py::keep_alive<1 , 2 >(), // IndexVamana should keep ctx alive.
282+ py::arg (" ctx" ),
283+ py::arg (" group_uri" ),
284+ py::arg (" timestamp" ) = 0 )
267285 .def (
268286 " __init__" ,
269287 [](IndexVamana& instance, py::kwargs kwargs) {
0 commit comments