@@ -589,7 +589,7 @@ def check_window_size(m, max_size=None):
589589 raise ValueError (f"The window size must be less than or equal to { max_size } " )
590590
591591
592- @njit (fastmath = True )
592+ @njit (fastmath = config . STUMPY_FASTMATH )
593593def _sliding_dot_product (Q , T ):
594594 """
595595 A Numba JIT-compiled implementation of the sliding window dot product.
@@ -657,7 +657,7 @@ def sliding_dot_product(Q, T):
657657
658658@njit (
659659 # "f8[:](f8[:], i8, b1[:])",
660- fastmath = { "nsz" , "arcp" , "contract" , "afn" , "reassoc" }
660+ fastmath = config . STUMPY_FASTMATH_FLAGS
661661)
662662def _welford_nanvar (a , w , a_subseq_isfinite ):
663663 """
@@ -771,7 +771,7 @@ def welford_nanstd(a, w=None):
771771 return np .sqrt (np .clip (welford_nanvar (a , w ), a_min = 0 , a_max = None ))
772772
773773
774- @njit (parallel = True , fastmath = { "nsz" , "arcp" , "contract" , "afn" , "reassoc" } )
774+ @njit (parallel = True , fastmath = config . STUMPY_FASTMATH_FLAGS )
775775def _rolling_nanstd_1d (a , w ):
776776 """
777777 A Numba JIT-compiled and parallelized function for computing the rolling standard
@@ -1110,7 +1110,7 @@ def _calculate_squared_distance(
11101110
11111111@njit (
11121112 # "f8[:](i8, f8[:], f8, f8, f8[:], f8[:])",
1113- fastmath = True ,
1113+ fastmath = config . STUMPY_FASTMATH ,
11141114)
11151115def _calculate_squared_distance_profile (
11161116 m , QT , μ_Q , σ_Q , M_T , Σ_T , Q_subseq_isconstant , T_subseq_isconstant
@@ -1176,7 +1176,7 @@ def _calculate_squared_distance_profile(
11761176
11771177@njit (
11781178 # "f8[:](i8, f8[:], f8, f8, f8[:], f8[:])",
1179- fastmath = True ,
1179+ fastmath = config . STUMPY_FASTMATH ,
11801180)
11811181def calculate_distance_profile (
11821182 m , QT , μ_Q , σ_Q , M_T , Σ_T , Q_subseq_isconstant , T_subseq_isconstant
@@ -1229,7 +1229,7 @@ def calculate_distance_profile(
12291229 return np .sqrt (D_squared )
12301230
12311231
1232- @njit (fastmath = True )
1232+ @njit (fastmath = config . STUMPY_FASTMATH )
12331233def _p_norm_distance_profile (Q , T , p = 2.0 ):
12341234 """
12351235 A Numba JIT-compiled and parallelized function for computing the p-normalized
@@ -1505,7 +1505,7 @@ def mueen_calculate_distance_profile(Q, T):
15051505
15061506@njit (
15071507 # "f8[:](f8[:], f8[:], f8[:], f8, f8, f8[:], f8[:])",
1508- fastmath = True
1508+ fastmath = config . STUMPY_FASTMATH
15091509)
15101510def _mass (Q , T , QT , μ_Q , σ_Q , M_T , Σ_T , Q_subseq_isconstant , T_subseq_isconstant ):
15111511 """
@@ -1978,7 +1978,7 @@ def _get_QT(start, T_A, T_B, m):
19781978
19791979@njit (
19801980 # ["(f8[:], i8, i8)", "(f8[:, :], i8, i8)"],
1981- fastmath = True
1981+ fastmath = config . STUMPY_FASTMATH
19821982)
19831983def _apply_exclusion_zone (a , idx , excl_zone , val ):
19841984 """
@@ -2308,7 +2308,7 @@ def array_to_temp_file(a):
23082308
23092309@njit (
23102310 # "i8[:](i8[:], i8, i8, i8)",
2311- fastmath = True ,
2311+ fastmath = config . STUMPY_FASTMATH ,
23122312)
23132313def _count_diagonal_ndist (diags , m , n_A , n_B ):
23142314 """
@@ -2505,7 +2505,7 @@ def rolling_isfinite(a, w):
25052505 )
25062506
25072507
2508- @njit (parallel = True , fastmath = { "nsz" , "arcp" , "contract" , "afn" , "reassoc" } )
2508+ @njit (parallel = True , fastmath = config . STUMPY_FASTMATH_FLAGS )
25092509def _rolling_isconstant (a , w ):
25102510 """
25112511 Compute the rolling isconstant for 1-D array.
@@ -2842,7 +2842,7 @@ def _idx_to_mp(
28422842 return P
28432843
28442844
2845- @njit (fastmath = True )
2845+ @njit (fastmath = config . STUMPY_FASTMATH )
28462846def _total_diagonal_ndists (tile_lower_diag , tile_upper_diag , tile_height , tile_width ):
28472847 """
28482848 Count the total number of distances covered by a range of diagonals
@@ -3970,7 +3970,7 @@ def _mdl(disc_subseqs, disc_neighbors, S, n_bit=8):
39703970
39713971@njit (
39723972 # "(i8, i8, f8[:, :], f8[:], i8, f8[:, :], i8[:, :], f8)",
3973- fastmath = { "nsz" , "arcp" , "contract" , "afn" , "reassoc" } ,
3973+ fastmath = config . STUMPY_FASTMATH_FLAGS ,
39743974)
39753975def _compute_multi_PI (d , idx , D , D_prime , range_start , P , I , p = 2.0 ):
39763976 """
0 commit comments