Skip to content

Commit 24bc232

Browse files
committed
replace fastmath flag with config variable
1 parent 7d02173 commit 24bc232

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stumpy/core.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2356,7 +2356,7 @@ def _count_diagonal_ndist(diags, m, n_A, n_B):
23562356

23572357
@njit(
23582358
# "i8[:, :](i8[:], i8, b1)"
2359-
fastmath=True
2359+
fastmath=config.STUMPY_FASTMATH_TRUE
23602360
)
23612361
def _get_array_ranges(a, n_chunks, truncate):
23622362
"""
@@ -2405,7 +2405,7 @@ def _get_array_ranges(a, n_chunks, truncate):
24052405

24062406
@njit(
24072407
# "i8[:, :](i8, i8, b1)"
2408-
fastmath=True
2408+
fastmath=config.STUMPY_FASTMATH_TRUE
24092409
)
24102410
def _get_ranges(size, n_chunks, truncate):
24112411
"""
@@ -3258,7 +3258,7 @@ def _select_P_ABBA_value(P_ABBA, k, custom_func=None):
32583258
return MPdist
32593259

32603260

3261-
@njit(fastmath={"nsz", "arcp", "contract", "afn", "reassoc"})
3261+
@njit(fastmath=config.STUMPY_FASTMATH_FLAGS)
32623262
def _merge_topk_PI(PA, PB, IA, IB):
32633263
"""
32643264
Merge two top-k matrix profiles `PA` and `PB`, and update `PA` (in place).
@@ -3331,7 +3331,7 @@ def _merge_topk_PI(PA, PB, IA, IB):
33313331
IA[i] = tmp_I
33323332

33333333

3334-
@njit(fastmath={"nsz", "arcp", "contract", "afn", "reassoc"})
3334+
@njit(fastmath=config.STUMPY_FASTMATH_FLAGS)
33353335
def _merge_topk_ρI(ρA, ρB, IA, IB):
33363336
"""
33373337
Merge two top-k pearson profiles `ρA` and `ρB`, and update `ρA` (in place).
@@ -3405,7 +3405,7 @@ def _merge_topk_ρI(ρA, ρB, IA, IB):
34053405
IA[i] = tmp_I
34063406

34073407

3408-
@njit(fastmath={"nsz", "arcp", "contract", "afn", "reassoc"})
3408+
@njit(fastmath=config.STUMPY_FASTMATH_FLAGS)
34093409
def _shift_insert_at_index(a, idx, v, shift="right"):
34103410
"""
34113411
If `shift=right` (default), all elements in `a[idx:]` are shifted to the right by
@@ -4381,7 +4381,7 @@ def get_ray_nworkers(ray_client):
43814381
return int(ray_client.cluster_resources().get("CPU"))
43824382

43834383

4384-
@njit(fastmath={"nsz", "arcp", "contract", "afn", "reassoc"})
4384+
@njit(fastmath=config.STUMPY_FASTMATH_FLAGS)
43854385
def _update_incremental_PI(D, P, I, excl_zone, n_appended=0):
43864386
"""
43874387
Given the 1D array distance profile, `D`, of the last subsequence of T,

0 commit comments

Comments
 (0)