title: saving Keras augmented data as a numpy array
body: <p>using keras <strong>ImageDataGenerator</strong>,
  we can save augmented images as png or jpg :</p>
  
  <pre><code>    for X_batch, y_batch in datagen.flow(train_data, train_labels, batch_size=batch_size,\
                  save_to_dir='images', save_prefix='aug', save_format='png'):
  </code></pre>
  
  <p>I have a dataset of the shape (1600, 4, 100,100), which means 1600 images with 4 channels of 100x100 pixels. How can I save the augmented data as numpy array of shape (N,4,100,100) instead of individual images?</p>