def _tiles(self, data: np.ndarray) -> np.ndarray:
    for y in range(0, data.shape[0], self.tile_size[0]):
        for x in range(0, data.shape[1], self.tile_size[1]):
            tile = data[y:(y + self.tile_size[0]), x:(x + self.tile_size[1])]
            if (tile.shape[:2] != self.tile_size):
                pad = ((0, (self.tile_size[0] - tile.shape[0])), (0, (self.tile_size[1] - tile.shape[1])))
                tile = np.pad(tile, pad, 'constant')
            final_tile = np.zeros((tile.shape[0], tile.shape[1], self.channels), dtype='uint8')
            final_tile[:, :, 0] = (tile * 255)
            final_tile[((final_tile[:, :, 0] > (255 / 10)), (self.channels - 1))] = 255
            (yield final_tile)
def _tiles(self, data: np.ndarray) -> np.ndarray:
    for y in range(0, data.shape[0], self.tile_size[0]):
        for x in range(0, data.shape[1], self.tile_size[1]):
            tile = data[y:(y + self.tile_size[0]), x:(x + self.tile_size[1])]
            if (tile.shape[:2] != self.tile_size):
                pad = ((0, (self.tile_size[0] - tile.shape[0])), (0, (self.tile_size[1] - tile.shape[1])))
                tile = np.pad(tile, pad, 'constant')
            final_tile = np.zeros((tile.shape[0], tile.shape[1], self.channels), dtype='uint8')
            final_tile[:, :, 0] = (tile * 255)
            final_tile[((final_tile[:, :, 0] > (255 / 10)), (self.channels - 1))] = 255
            (yield final_tile)