From 294ab77de287a5b2cdaf7d60fd6bf9bf147eedc3 Mon Sep 17 00:00:00 2001 From: eli knaap Date: Thu, 27 Jul 2023 15:28:47 -0700 Subject: [PATCH] nopython=False --- esda/crand.py | 4 ++-- esda/gamma.py | 2 +- esda/geary_local.py | 2 +- esda/getisord.py | 4 ++-- esda/join_counts_local.py | 2 +- esda/join_counts_local_bv.py | 4 ++-- esda/join_counts_local_mv.py | 2 +- esda/lee.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/esda/crand.py b/esda/crand.py index d4413f4c..f9214215 100644 --- a/esda/crand.py +++ b/esda/crand.py @@ -559,7 +559,7 @@ def parallel_crand( ####################################################################### -@njit(fastmath=False) +@njit(fastmath=False, nopython=True) def _prepare_univariate(i, z, permuted_ids, weights_i): mask = np.ones_like(z, dtype=boolean) mask[i] = False @@ -570,7 +570,7 @@ def _prepare_univariate(i, z, permuted_ids, weights_i): return z[i], zrand -@njit(fastmath=False) +@njit(fastmath=False, nopython=True) def _prepare_bivariate(i, z, permuted_ids, weights_i): zx = z[:, 0] zy = z[:, 1] diff --git a/esda/gamma.py b/esda/gamma.py index 757780d1..52ec3c23 100644 --- a/esda/gamma.py +++ b/esda/gamma.py @@ -275,7 +275,7 @@ def by_col( # -------------------------------------------------------------- # Conditional Randomization Function Implementations # -------------------------------------------------------------- -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _local_gamma_crand(i, z, permuted_ids, weights_i, scaling): zi, zrand = _prepare_univariate(i, z, permuted_ids, weights_i) return (zi * zrand) @ weights_i * scaling diff --git a/esda/geary_local.py b/esda/geary_local.py index bd1a98e4..4f900615 100644 --- a/esda/geary_local.py +++ b/esda/geary_local.py @@ -196,7 +196,7 @@ def _statistic(x, w, drop_islands): # Note: does not using the scaling parameter -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _local_geary(i, z, permuted_ids, weights_i, scaling): other_weights = weights_i[1:] zi, zrand = _prepare_univariate(i, z, permuted_ids, other_weights) diff --git a/esda/getisord.py b/esda/getisord.py index 9c7e1018..d702e48f 100644 --- a/esda/getisord.py +++ b/esda/getisord.py @@ -641,14 +641,14 @@ def _infer_star_and_structure_w(weights, star, transform): # -------------------------------------------------------------- -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _g_local_crand(i, z, permuted_ids, weights_i, scaling): other_weights = weights_i[1:] zi, zrand = _prepare_univariate(i, z, permuted_ids, other_weights) return (zrand @ other_weights) / (scaling - zi) -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _g_local_star_crand(i, z, permuted_ids, weights_i, scaling): self_weight = weights_i[0] other_weights = weights_i[1:] diff --git a/esda/join_counts_local.py b/esda/join_counts_local.py index bd1a0db9..c37dcf71 100644 --- a/esda/join_counts_local.py +++ b/esda/join_counts_local.py @@ -173,7 +173,7 @@ def _statistic(y, w, drop_islands): # Note: scaling not used -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _ljc_uni(i, z, permuted_ids, weights_i, scaling): # self_weight = weights_i[0] other_weights = weights_i[1:] diff --git a/esda/join_counts_local_bv.py b/esda/join_counts_local_bv.py index 2f6b20a7..f59d6477 100644 --- a/esda/join_counts_local_bv.py +++ b/esda/join_counts_local_bv.py @@ -230,7 +230,7 @@ def _statistic(x, z, w, case, drop_islands): # Note: scaling not used -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _ljc_bv_case1(i, z, permuted_ids, weights_i, scaling): zx = z[:, 0] zy = z[:, 1] @@ -239,7 +239,7 @@ def _ljc_bv_case1(i, z, permuted_ids, weights_i, scaling): return zx[i] * (zyrand @ other_weights) -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _ljc_bv_case2(i, z, permuted_ids, weights_i, scaling): zy = z[:, 1] other_weights = weights_i[1:] diff --git a/esda/join_counts_local_mv.py b/esda/join_counts_local_mv.py index 119dac7b..3f63cae0 100644 --- a/esda/join_counts_local_mv.py +++ b/esda/join_counts_local_mv.py @@ -181,7 +181,7 @@ def _statistic(variables, w, drop_islands): # Note: scaling not used -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _ljc_mv(i, z, permuted_ids, weights_i, scaling): other_weights = weights_i[1:] zi, zrand = _prepare_univariate(i, z, permuted_ids, other_weights) diff --git a/esda/lee.py b/esda/lee.py index fc863ee9..5354c44f 100644 --- a/esda/lee.py +++ b/esda/lee.py @@ -245,7 +245,7 @@ def _statistic(Z, W): # -------------------------------------------------------------- -@_njit(fastmath=True) +@_njit(fastmath=True, nopython=False) def _local_spatial_pearson_crand(i, z, permuted_ids, weights_i, scaling): zxi, zxrand, zyi, zyrand = _prepare_bivariate(i, z, permuted_ids, weights_i) return (zyrand @ weights_i) * (zxrand @ weights_i) * scaling