SPATZ/spatz/transforms/transform.py
2023-12-14 23:30:35 +01:00

12 lines
271 B
Python

import numpy as np
from numpy.typing import ArrayLike
from typing import Any, Tuple
class Transform:
def apply(self, t: float, x: ArrayLike):
y = self(t, x)
assert x.shape == y.shape, "Transform has to maintain the array's shape."
return y