@@ -122,13 +122,13 @@ def kernel_scalar_start_step(start, step):
122122@blosc2 .dsl_kernel
123123def kernel_scalar_start_stop_nitems (start , stop , nitems ):
124124 step = (stop - start ) / nitems
125- return start + _global_linear_idx * step # noqa: F821 # DSL index/shape symbols resolved by miniexpr
125+ return start + _flat_idx * step # noqa: F821 # DSL index/shape symbols resolved by miniexpr
126126
127127
128128@blosc2 .dsl_kernel
129129def kernel_scalar_start_stop_nitems_float_cast (start , stop , nitems ):
130130 step = (float (stop ) - float (start )) / float (nitems )
131- return float (start ) + _global_linear_idx * step # noqa: F821 # DSL index/shape symbols resolved by miniexpr
131+ return float (start ) + _flat_idx * step # noqa: F821 # DSL index/shape symbols resolved by miniexpr
132132
133133
134134@blosc2 .dsl_kernel
@@ -591,7 +591,7 @@ def test_dsl_kernel_float_cast_with_negative_scalar_param():
591591 np .testing .assert_allclose (res [...], expected , rtol = 1e-6 , atol = 1e-6 )
592592
593593
594- def test_dsl_kernel_float_cast_with_global_linear_idx_no_segfault_subprocess ():
594+ def test_dsl_kernel_float_cast_with_flat_idx_no_segfault_subprocess ():
595595 if blosc2 .IS_WASM :
596596 pytest .skip ("subprocess is not supported on emscripten/wasm32" )
597597
@@ -603,7 +603,7 @@ def test_dsl_kernel_float_cast_with_global_linear_idx_no_segfault_subprocess():
603603 @blosc2.dsl_kernel
604604 def kernel(start, stop, nitems):
605605 step = (float(stop) - float(start)) / float(nitems)
606- return float(start) + _global_linear_idx * step # noqa: F821
606+ return float(start) + _flat_idx * step # noqa: F821
607607
608608 shape = (10, 100)
609609 arr = blosc2.lazyudf(kernel, (-10, 10, 999), dtype=np.float32, shape=shape).compute()
0 commit comments