def _rotate_batch(batch, angle): return np.vstack([rotate(x_i.reshape(28, 28), angle).reshape([-1, 28*28]) for x_i in batch])