Skip to content
Snippets Groups Projects
Commit cf2ec066 authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Fix inheritance of special math function enum classes

parent ef9239ed
No related branches found
No related tags found
1 merge request!438Reduction Support
...@@ -94,7 +94,7 @@ class MathFunctions(Enum): ...@@ -94,7 +94,7 @@ class MathFunctions(Enum):
self.num_args = num_args self.num_args = num_args
class NumericLimitsFunctions(MathFunctions): class NumericLimitsFunctions(Enum):
"""Numerical limits functions supported by the backend. """Numerical limits functions supported by the backend.
Each platform has to materialize these functions to a concrete implementation. Each platform has to materialize these functions to a concrete implementation.
...@@ -109,12 +109,12 @@ class PsMathFunction(PsFunction): ...@@ -109,12 +109,12 @@ class PsMathFunction(PsFunction):
__match_args__ = ("func",) __match_args__ = ("func",)
def __init__(self, func: MathFunctions) -> None: def __init__(self, func: MathFunctions | NumericLimitsFunctions) -> None:
super().__init__(func.function_name, func.num_args) super().__init__(func.function_name, func.num_args)
self._func = func self._func = func
@property @property
def func(self) -> MathFunctions: def func(self) -> MathFunctions | NumericLimitsFunctions:
return self._func return self._func
def __str__(self) -> str: def __str__(self) -> str:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment