Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nopython=False #255

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions esda/crand.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion esda/gamma.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion esda/geary_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions esda/getisord.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]
Expand Down
2 changes: 1 addition & 1 deletion esda/join_counts_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]
Expand Down
4 changes: 2 additions & 2 deletions esda/join_counts_local_bv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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:]
Expand Down
2 changes: 1 addition & 1 deletion esda/join_counts_local_mv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion esda/lee.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading