Source code for pymoose.computation.values
from dataclasses import dataclass
import numpy as np
[docs]@dataclass
class TensorConstant(Constant):
value: np.ndarray
def __hash__(self):
return hash(self.value.tobytes())
def __eq__(self, other):
return isinstance(other, TensorConstant) and np.all(self.value == other.value)