Skip to content
Merged
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
6 changes: 3 additions & 3 deletions ndfilters/_convolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def convolve(
return result


@numba.njit(parallel=True)
@numba.njit(parallel=True, cache=True)
def _convolve_1d(
array: np.ndarray,
kernel: np.ndarray,
Expand Down Expand Up @@ -196,7 +196,7 @@ def _convolve_1d(
return result


@numba.njit(parallel=True)
@numba.njit(parallel=True, cache=True)
def _convolve_2d(
array: np.ndarray,
kernel: np.ndarray,
Expand Down Expand Up @@ -254,7 +254,7 @@ def _convolve_2d(
return result


@numba.njit(parallel=True)
@numba.njit(parallel=True, cache=True)
def _convolve_3d(
array: np.ndarray,
kernel: np.ndarray,
Expand Down
6 changes: 3 additions & 3 deletions ndfilters/_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def function(a: np.ndarray, args: tuple) -> float:
return result


@numba.njit(parallel=True)
@numba.njit(parallel=True, cache=True)
def _generic_filter_1d(
array: np.ndarray,
function: Callable[[np.ndarray, tuple], float],
Expand Down Expand Up @@ -187,7 +187,7 @@ def _generic_filter_1d(
return result


@numba.njit(parallel=True)
@numba.njit(parallel=True, cache=True)
def _generic_filter_2d(
array: np.ndarray,
function: Callable[[np.ndarray, tuple], float],
Expand Down Expand Up @@ -252,7 +252,7 @@ def _generic_filter_2d(
return result


@numba.njit(parallel=True)
@numba.njit(parallel=True, cache=True)
def _generic_filter_3d(
array: np.ndarray,
function: Callable[[np.ndarray, tuple], float],
Expand Down
4 changes: 2 additions & 2 deletions ndfilters/_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
]


@numba.njit
@numba.njit(cache=True)
def rectify_index_lower(index: int, size: int, mode: str) -> int:
if mode == "mirror":
return -index
Expand All @@ -18,7 +18,7 @@ def rectify_index_lower(index: int, size: int, mode: str) -> int:
raise ValueError


@numba.njit
@numba.njit(cache=True)
def rectify_index_upper(index: int, size: int, mode: str) -> int:
if mode == "mirror":
return ~(index % size + 1)
Expand Down
2 changes: 1 addition & 1 deletion ndfilters/_mean.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def mean_filter(
)


@numba.njit
@numba.njit(cache=True)
def _mean(
array: np.ndarray,
args: tuple[float],
Expand Down
2 changes: 1 addition & 1 deletion ndfilters/_median.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def median_filter(
)


@numba.njit
@numba.njit(cache=True)
def _median(
array: np.ndarray,
args: tuple[float],
Expand Down
2 changes: 1 addition & 1 deletion ndfilters/_trimmed_mean.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def trimmed_mean_filter(
)


@numba.njit
@numba.njit(cache=True)
def _trimmed_mean(
array: np.ndarray,
args: tuple[float],
Expand Down
2 changes: 1 addition & 1 deletion ndfilters/_variance.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def variance_filter(
)


@numba.njit
@numba.njit(cache=True)
def _variance(
array: np.ndarray,
args: tuple[float],
Expand Down