From 2cf187fdb81da46440c791e1b4e2b61c5e619daa Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 28 Jul 2024 20:18:02 -0700 Subject: [PATCH] def-in-loop needs assigments for vars --- masque/shapes/shape.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/masque/shapes/shape.py b/masque/shapes/shape.py index b7b74d6..0a7c86d 100644 --- a/masque/shapes/shape.py +++ b/masque/shapes/shape.py @@ -165,7 +165,7 @@ class Shape(PositionableImpl, Rotatable, Mirrorable, Copyable, Scalable, m = dv[1] / dv[0] - def get_grid_inds(xes: ArrayLike) -> NDArray[numpy.float64]: + def get_grid_inds(xes: ArrayLike, m: float = m, v: NDArray = v) -> NDArray[numpy.float64]: ys = m * (xes - v[0]) + v[1] # (inds - 1) is the index of the y-grid line below the edge's intersection with the x-grid