diff --git a/pde/grids/base.py b/pde/grids/base.py index aa650dd1..46ba68e9 100644 --- a/pde/grids/base.py +++ b/pde/grids/base.py @@ -55,7 +55,7 @@ PI_4 = 4 * np.pi PI_43 = 4 / 3 * np.pi -CoordsType = Literal["cartesian", "grid", "cells"] +CoordsType = Literal["cartesian", "grid", "cell"] class OperatorInfo(NamedTuple): @@ -663,10 +663,7 @@ def _grid_to_cell( return cells # type: ignore def transform( - self, - coordinates: np.ndarray, - source: Literal["cartesian", "cell", "grid"], - target: Literal["cartesian", "cell", "grid"], + self, coordinates: np.ndarray, source: CoordsType, target: CoordsType ) -> np.ndarray: """converts coordinates from one coordinate system to another