Skip to content

Commit f94686c

Browse files
author
Nikos Papailiou
committed
Add ctx when reading schemas
1 parent 3fabeda commit f94686c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apis/python/src/tiledb/vector_search/index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ def __init__(
154154

155155
dtype = group.meta.get("dtype", None)
156156
if dtype is None:
157-
schema = tiledb.ArraySchema.load(self.parts_db_uri)
157+
schema = tiledb.ArraySchema.load(self.parts_db_uri, ctx=self.ctx)
158158
self.dtype = np.dtype(schema.attr("values").dtype)
159159
else:
160160
self.dtype = np.dtype(dtype)
161161

162162
self.partitions = group.meta.get("partitions", -1)
163163
if self.partitions == -1:
164-
schema = tiledb.ArraySchema.load(self.centroids_uri)
164+
schema = tiledb.ArraySchema.load(self.centroids_uri, ctx=self.ctx)
165165
self.partitions = schema.domain.dim("cols").domain[1] + 1
166166

167167
def query(

0 commit comments

Comments
 (0)