From 7a7f285a37c5e2eb4b4186e5fbfbe48788b7172e Mon Sep 17 00:00:00 2001 From: David Zwicker Date: Tue, 3 Oct 2023 19:10:14 +0200 Subject: [PATCH] Fixed bug in typing --- pde/grids/base.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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