Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions arraycontext/fake_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

import operator
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Literal, cast, overload

import numpy as np
Expand Down Expand Up @@ -66,14 +65,13 @@

# {{{ BaseFakeNumpyNamespace

@dataclass(frozen=True)
class BaseFakeNumpyNamespace(ABC):
_array_context: ArrayContext
linalg: BaseFakeNumpyLinalgNamespace

def __init__(self, array_context: ArrayContext):
object.__setattr__(self, "_array_context", array_context)
object.__setattr__(self, "linalg", self._get_fake_numpy_linalg_namespace())
self._array_context = array_context
self.linalg = self._get_fake_numpy_linalg_namespace()

def _get_fake_numpy_linalg_namespace(self):
return BaseFakeNumpyLinalgNamespace(self._array_context)
Expand Down
Loading