Skip to content

Commit 6668ccc

Browse files
committed
fix incorrect dataclass freeze
1 parent 16740c8 commit 6668ccc

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

pytential/qbx/geometry.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
Subordinate data structures
5858
^^^^^^^^^^^^^^^^^^^^^^^^^^^
5959
60-
.. autoclass:: TargetInfo()
60+
.. autoclass:: TargetInfo
6161
62-
.. autoclass:: CenterToTargetList()
62+
.. autoclass:: CenterToTargetList
6363
6464
Enums of special values
6565
^^^^^^^^^^^^^^^^^^^^^^^
@@ -285,7 +285,6 @@ def make_container(
285285

286286
# {{{ geometry data
287287

288-
@dataclass_array_container
289288
@dataclass(frozen=True)
290289
class TargetInfo:
291290
"""Describes the internal structure of the QBX FMM's list of :attr:`targets`.

pytential/unregularized.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from meshmode.dof_array import DOFArray
3535

3636
from pytential.source import LayerPotentialSourceBase
37-
from pytential.array_context import PyOpenCLArrayContext, dataclass_array_container
37+
from pytential.array_context import PyOpenCLArrayContext
3838

3939
import logging
4040
logger = logging.getLogger(__name__)
@@ -344,7 +344,6 @@ def build_traversal(self):
344344
return FMMTraversalBuilder(self.array_context)
345345

346346

347-
@dataclass_array_container
348347
@dataclass(frozen=True)
349348
class _TargetInfo:
350349
"""
@@ -455,13 +454,11 @@ def target_info(self):
455454
),
456455
)
457456

458-
info = _TargetInfo(
459-
targets=targets,
457+
return _TargetInfo(
458+
targets=actx.freeze(targets),
460459
target_discr_starts=target_discr_starts,
461460
ntargets=ntargets)
462461

463-
return actx.freeze(info)
464-
465462
# }}}
466463

467464

0 commit comments

Comments
 (0)