File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
apis/python/src/tiledb/vector_search Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,15 @@ def __init__(
3636 ctx = self .ctx ,
3737 config = config ,
3838 )
39- self .ids_uri = self .group [
40- storage_formats [self .storage_version ]["IDS_ARRAY_NAME" ] + self .index_version
41- ].uri
42- if tiledb .array_exists (self .ids_uri , self .ctx ):
43- self ._ids = read_vector_u64 (self .ctx , self .ids_uri , 0 , 0 )
44- else :
39+ try :
40+ self .ids_uri = self .group [
41+ storage_formats [self .storage_version ]["IDS_ARRAY_NAME" ] + self .index_version
42+ ].uri
43+ if tiledb .array_exists (self .ids_uri , self .ctx ):
44+ self ._ids = read_vector_u64 (self .ctx , self .ids_uri , 0 , 0 )
45+ else :
46+ self ._ids = StdVector_u64 (np .arange (self .size ).astype (np .uint64 ))
47+ except tiledb .TileDBError :
4548 self ._ids = StdVector_u64 (np .arange (self .size ).astype (np .uint64 ))
4649
4750 dtype = self .group .meta .get ("dtype" , None )
You can’t perform that action at this time.
0 commit comments