diff --git a/masque/repetition.py b/masque/repetition.py index 0426c08..867adf7 100644 --- a/masque/repetition.py +++ b/masque/repetition.py @@ -64,7 +64,7 @@ class Grid(Repetition): _a_count: int """ Number of instances along the direction specified by the `a_vector` """ - _b_vector: NDArray[numpy.float64] | None + _b_vector: NDArray[numpy.float64] """ Vector `[x, y]` specifying a second lattice vector for the grid. Specifies center-to-center spacing between adjacent elements. Can be `None` for a 1D array. @@ -199,9 +199,6 @@ class Grid(Repetition): @property def displacements(self) -> NDArray[numpy.float64]: - if self.b_vector is None: - return numpy.arange(self.a_count)[:, None] * self.a_vector[None, :] - aa, bb = numpy.meshgrid(numpy.arange(self.a_count), numpy.arange(self.b_count), indexing='ij') return (aa.flatten()[:, None] * self.a_vector[None, :] + bb.flatten()[:, None] * self.b_vector[None, :]) # noqa