Skip to content

Commit 31d849e

Browse files
committed
fix memoization key. The frozen type of an actx is sensitive to actx's type
1 parent f09fdd4 commit 31d849e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: meshmode/discretization/connection/direct.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def __init__(self,
356356
# {{{ _resample_matrix
357357

358358
@keyed_memoize_method(key=lambda actx, to_group_index, ibatch_index:
359-
(to_group_index, ibatch_index))
359+
(type(actx).__name__, to_group_index, ibatch_index))
360360
def _resample_matrix(self, actx: ArrayContext, to_group_index: int,
361361
ibatch_index: int):
362362
import modepy as mp
@@ -435,7 +435,8 @@ def _resample_point_pick_indices(self, to_group_index: int, ibatch_index: int,
435435
return result
436436

437437
@keyed_memoize_method(lambda actx, to_group_index, ibatch_index,
438-
tol_multiplier=None: (to_group_index, ibatch_index, tol_multiplier))
438+
tol_multiplier=None: (type(actx).__name__, to_group_index,
439+
ibatch_index, tol_multiplier))
439440
def _frozen_resample_point_pick_indices(self, actx: ArrayContext,
440441
to_group_index: int, ibatch_index: int,
441442
tol_multiplier: Optional[float] = None):

0 commit comments

Comments
 (0)