Skip to content

Commit 9f87a25

Browse files
committed
feat: remove dataclass from BaseFakeNumpyNamespace
1 parent 2eaa08f commit 9f87a25

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

arraycontext/fake_numpy.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
import operator
3131
from abc import ABC, abstractmethod
32-
from dataclasses import dataclass
3332
from typing import TYPE_CHECKING, Any, Literal, cast, overload
3433

3534
import numpy as np
@@ -66,14 +65,13 @@
6665

6766
# {{{ BaseFakeNumpyNamespace
6867

69-
@dataclass(frozen=True)
7068
class BaseFakeNumpyNamespace(ABC):
7169
_array_context: ArrayContext
7270
linalg: BaseFakeNumpyLinalgNamespace
7371

7472
def __init__(self, array_context: ArrayContext):
75-
object.__setattr__(self, "_array_context", array_context)
76-
object.__setattr__(self, "linalg", self._get_fake_numpy_linalg_namespace())
73+
self._array_context = array_context
74+
self.linalg = self._get_fake_numpy_linalg_namespace()
7775

7876
def _get_fake_numpy_linalg_namespace(self):
7977
return BaseFakeNumpyLinalgNamespace(self._array_context)

0 commit comments

Comments
 (0)