@@ -240,7 +240,9 @@ def cnv_hmm(
240240 # noinspection PyArgumentList
241241 other = pd .Interval (r .start , r .end , closed = "both" )
242242 loc_region = index .overlaps (other ) # type: ignore
243- x = x .isel (variants = loc_region )
243+ # Convert boolean mask to integer indices for NumPy 2.x compatibility
244+ variant_indices = np .where (loc_region )[0 ]
245+ x = x .isel (variants = variant_indices )
244246
245247 lx .append (x )
246248
@@ -267,7 +269,9 @@ def cnv_hmm(
267269 if max_coverage_variance is not None :
268270 cov_var = ds ["sample_coverage_variance" ].values
269271 loc_pass_samples = cov_var <= max_coverage_variance
270- ds = ds .isel (samples = loc_pass_samples )
272+ # Convert boolean mask to integer indices for NumPy 2.x compatibility
273+ sample_indices = np .where (loc_pass_samples )[0 ]
274+ ds = ds .isel (samples = sample_indices )
271275
272276 return ds
273277
@@ -445,7 +449,9 @@ def cnv_coverage_calls(
445449 # noinspection PyArgumentList
446450 other = pd .Interval (r .start , r .end , closed = "both" )
447451 loc_region = index .overlaps (other ) # type: ignore
448- x = x .isel (variants = loc_region )
452+ # Convert boolean mask to integer indices for NumPy 2.x compatibility
453+ variant_indices = np .where (loc_region )[0 ]
454+ x = x .isel (variants = variant_indices )
449455
450456 lx .append (x )
451457 ds = _simple_xarray_concat (lx , dim = DIM_VARIANT )
0 commit comments