@@ -411,13 +411,13 @@ def read_source_metadata(
411411 ) -> Tuple [int , int , np .dtype ]:
412412 if source_type == "TILEDB_ARRAY" :
413413 schema = tiledb .ArraySchema .load (source_uri )
414- size = schema .domain .dim (1 ).domain [1 ] + 1
415- dimensions = schema .domain .dim (0 ).domain [1 ] + 1
414+ size = np . int64 ( schema .domain .dim (1 ).domain [1 ]) + 1
415+ dimensions = np . int64 ( schema .domain .dim (0 ).domain [1 ]) + 1
416416 return size , dimensions , schema .attr (0 ).dtype
417417 if source_type == "TILEDB_SPARSE_ARRAY" :
418418 schema = tiledb .ArraySchema .load (source_uri )
419- size = schema .domain .dim (0 ).domain [1 ] + 1
420- dimensions = schema .domain .dim (1 ).domain [1 ] + 1
419+ size = np . int64 ( schema .domain .dim (0 ).domain [1 ]) + 1
420+ dimensions = np . int64 ( schema .domain .dim (1 ).domain [1 ]) + 1
421421 return size , dimensions , schema .attr (0 ).dtype
422422 if source_type == "TILEDB_PARTITIONED_ARRAY" :
423423 with tiledb .open (source_uri , "r" , config = config ) as source_array :
@@ -1491,8 +1491,13 @@ def ingest_flat(
14911491 verbose = verbose ,
14921492 trace_id = trace_id ,
14931493 )
1494+ # NOTE: We add kind='sort' as a workaround to this bug: https://github.com/numpy/numpy/issues/26922
14941495 updates_filter = np .in1d (
1495- external_ids , updated_ids , assume_unique = True , invert = True
1496+ external_ids ,
1497+ updated_ids ,
1498+ assume_unique = True ,
1499+ invert = True ,
1500+ kind = "sort" ,
14961501 )
14971502 in_vectors = in_vectors [updates_filter ]
14981503 external_ids = external_ids [updates_filter ]
@@ -1613,8 +1618,13 @@ def ingest_type_erased(
16131618 )
16141619
16151620 # Then check if the external id is in the updated ids.
1621+ # NOTE: We add kind='sort' as a workaround to this bug: https://github.com/numpy/numpy/issues/26922
16161622 updates_filter = np .in1d (
1617- external_ids , updated_ids , assume_unique = True , invert = True
1623+ external_ids ,
1624+ updated_ids ,
1625+ assume_unique = True ,
1626+ invert = True ,
1627+ kind = "sort" ,
16181628 )
16191629 # We only keep the vectors and external ids that are not in the updated ids.
16201630 in_vectors = in_vectors [updates_filter ]
@@ -1967,7 +1977,7 @@ def consolidate_partition_udf(
19671977 prev_index = partial_indexes [i ]
19681978 i += 1
19691979 for partition_id in range (partitions ):
1970- s = slice (int (prev_index ), int (partial_indexes [i ] - 1 ) )
1980+ s = slice (int (prev_index ), int (partial_indexes [i ]) - 1 )
19711981 if (
19721982 s .start <= s .stop
19731983 and s .start != np .iinfo (np .dtype ("uint64" )).max
0 commit comments