Skip to content

Commit

Permalink
fix incorrect dataclass freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Sep 23, 2022
1 parent 16740c8 commit 6668ccc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions pytential/qbx/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
Subordinate data structures
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: TargetInfo()
.. autoclass:: TargetInfo
.. autoclass:: CenterToTargetList()
.. autoclass:: CenterToTargetList
Enums of special values
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -285,7 +285,6 @@ def make_container(

# {{{ geometry data

@dataclass_array_container
@dataclass(frozen=True)
class TargetInfo:
"""Describes the internal structure of the QBX FMM's list of :attr:`targets`.
Expand Down
9 changes: 3 additions & 6 deletions pytential/unregularized.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from meshmode.dof_array import DOFArray

from pytential.source import LayerPotentialSourceBase
from pytential.array_context import PyOpenCLArrayContext, dataclass_array_container
from pytential.array_context import PyOpenCLArrayContext

import logging
logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -344,7 +344,6 @@ def build_traversal(self):
return FMMTraversalBuilder(self.array_context)


@dataclass_array_container
@dataclass(frozen=True)
class _TargetInfo:
"""
Expand Down Expand Up @@ -455,13 +454,11 @@ def target_info(self):
),
)

info = _TargetInfo(
targets=targets,
return _TargetInfo(
targets=actx.freeze(targets),
target_discr_starts=target_discr_starts,
ntargets=ntargets)

return actx.freeze(info)

# }}}


Expand Down

0 comments on commit 6668ccc

Please sign in to comment.