various fixes

This commit is contained in:
Jan Petykiewicz 2020-08-12 21:43:46 -07:00
commit d14182998b
6 changed files with 31 additions and 24 deletions

View file

@ -170,8 +170,8 @@ class Grid(LockableImpl, Repetition, metaclass=AutoSlots):
@property
def displacements(self) -> numpy.ndarray:
aa, bb = numpy.meshgrid(numpy.arange(self.a_count), numpy.arange(self.b_count), indexing='ij')
return (aa.flat[:, None] * self.a_vector[None, :] +
bb.flat[:, None] * self.b_vector[None, :])
return (aa.flatten()[:, None] * self.a_vector[None, :] +
bb.flatten()[:, None] * self.b_vector[None, :])
def rotate(self, rotation: float) -> 'Grid':
"""