Skip to content

Commit

Permalink
MAINT: Extend base model to include Image - only preparation for othe…
Browse files Browse the repository at this point in the history
…r models to come
  • Loading branch information
jwboth committed Jul 29, 2024
1 parent 75b7a2d commit 9638a72
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/darsia/signals/models/basemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@

import abc
import copy
from typing import Literal, Optional, Union
from typing import Literal, Optional, Union, overload

import numpy as np

import darsia


class Model:

@abc.abstractmethod
@overload
def __call__(self, signal: np.ndarray) -> np.ndarray: ...

@abc.abstractmethod
@overload
def __call__(self, signal: darsia.Image) -> darsia.Image: ...

@abc.abstractmethod
def __call__(self, img: np.ndarray) -> np.ndarray:
def __call__(self, img: np.ndarray | darsia.Image) -> np.ndarray | darsia.Image:
"""
Translation of signal to data.
"""
Expand Down

0 comments on commit 9638a72

Please sign in to comment.