diff --git a/src/cubepy/integration.py b/src/cubepy/integration.py index d87b4af..b6d37b2 100644 --- a/src/cubepy/integration.py +++ b/src/cubepy/integration.py @@ -255,7 +255,7 @@ def tiled_rule(center, halfwidth, vol, evtidx): lens = np.roll(np.cumsum(np.array(list(map(lambda x: x.shape[1], c_sp))), 0), 1) lens[0] = 0 - def tile_rule_worker(iter, c, h, v, e): + def rule_worker(iter, c, h, v, e): end = iter + c.shape[1] val, err, sub = rule(_f(e), c, h, v) value[:, iter:end] = val @@ -267,7 +267,7 @@ def tile_rule_worker(iter, c, h, v, e): else: max_workers = parallel with ThreadPoolExecutor(max_workers=max_workers) as exec: - exec.map(tile_rule_worker, lens, c_sp, h_sp, v_sp, e_sp) + exec.map(rule_worker, lens, c_sp, h_sp, v_sp, e_sp) return value, error, split_dim diff --git a/tests/test_models.py b/tests/test_models.py index 361c6da..b3f2fd3 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -69,7 +69,7 @@ def us_std_atm_density(z, earth_radius=6371): z = np.asarray(z) h = z * earth_radius / (z + earth_radius) - i = np.searchsorted(H_b, h, side="right") - 1 + i = np.searchsorted(H_b, h, side="right") - 1 # <--!! deltah = h - H_b[i] @@ -77,7 +77,7 @@ def us_std_atm_density(z, earth_radius=6371): mask = Lm_b[i] == 0 pressure = np.full(z.shape, P_b[i]) - pressure[mask] *= np.exp(-gmr * deltah[mask] / T_b[i][mask]) + pressure[mask] *= np.exp(-gmr * deltah[mask] / T_b[i][mask]) # <--!! pressure[~mask] *= (T_b[i][~mask] / temperature[~mask]) ** ( gmr / Lm_b[i][~mask] )