def _get_batches_of_transformed_samples(self, index_array):
    batch_x = np.zeros(tuple(([len(index_array)] + list(self.x.shape)[1:])), dtype=K.floatx())
    for (i, j) in enumerate(index_array):
        x = self.x[j]
        x = self.image_data_generator.random_transform(x.astype(K.floatx()))
        x = self.image_data_generator.standardize(x)
        batch_x[i] = x
    if self.save_to_dir:
        for (i, j) in enumerate(index_array):
            img = array_to_img(batch_x[i], self.data_format, scale=True)
            fname = '{prefix}_{index}_{hash}.{format}'.format(prefix=self.save_prefix, index=j, hash=np.random.randint(10000.0), format=self.save_format)
            img.save(os.path.join(self.save_to_dir, fname))
    batch_x_miscs = [xx[index_array] for xx in self.x_misc]
    output = ((batch_x if (batch_x_miscs == []) else ([batch_x] + batch_x_miscs)),)
    if (self.y is None):
        return output[0]
    output += (self.y[index_array],)
    if (self.sample_weight is not None):
        output += (self.sample_weight[index_array],)
    return output
def _get_batches_of_transformed_samples(self, index_array):
    batch_x = np.zeros(tuple(([len(index_array)] + list(self.x.shape)[1:])), dtype=K.floatx())
    for (i, j) in enumerate(index_array):
        x = self.x[j]
        x = self.image_data_generator.random_transform(x.astype(K.floatx()))
        x = self.image_data_generator.standardize(x)
        batch_x[i] = x
    if self.save_to_dir:
        for (i, j) in enumerate(index_array):
            img = array_to_img(batch_x[i], self.data_format, scale=True)
            fname = '{prefix}_{index}_{hash}.{format}'.format(prefix=self.save_prefix, index=j, hash=np.random.randint(10000.0), format=self.save_format)
            img.save(os.path.join(self.save_to_dir, fname))
    batch_x_miscs = [xx[index_array] for xx in self.x_misc]
    output = ((batch_x if (batch_x_miscs == []) else ([batch_x] + batch_x_miscs)),)
    if (self.y is None):
        return output[0]
    output += (self.y[index_array],)
    if (self.sample_weight is not None):
        output += (self.sample_weight[index_array],)
    return output