Exemplo n.º 1
0
 def __getitem__(self, *args, **kwargs):
     m = Maze().generate(width=self.width, height=self.height)
     m = m._to_str_matrix(_np=True)
     m = torch.from_numpy(m)
     return m
Exemplo n.º 2
0
 def __iter__(self):
     m = Maze().generate(width=self.width, height=self.height)
     m = m._to_str_matrix(_np=True)
     m = torch.from_numpy(m)
     yield m