Skip to content

Commit

Permalink
change to lru_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Moerland committed Jan 2, 2025
1 parent 5773175 commit 10d4066
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lumicks/pyoptics/mathutils/integration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import math
from functools import cache
from functools import lru_cache

import numpy as np
from scipy.special import roots_legendre
Expand Down Expand Up @@ -54,7 +54,7 @@ def determine_integration_order(method: str, n_orders: int):
return integration_order


@cache
@lru_cache(maxsize=8)
def get_integration_locations(integration_order: int, method: str):
if method == "lebedev-laikov":
return [np.asarray(c) for c in ll_get_integration_locations(integration_order)]
Expand All @@ -75,7 +75,7 @@ def get_integration_locations(integration_order: int, method: str):
return x, y, z, w


@cache
@lru_cache(maxsize=8)
def clenshaw_curtis_weights(integration_order: int):
"""Generate sample locations and weigths for Clenshaw-Curtis integration.
Expand Down

0 comments on commit 10d4066

Please sign in to comment.