title: How can I deal Numpy object in Numpy object?
body: <p>I wanna to make a multi-classification model from <a href="https://www.kaggle.com/nih-chest-xrays/data" rel="nofollow noreferrer">this dataset</a>.</p>
  <p>When I deal labels with <code>Keras.preprocessing.image.ImageDataGenerator - flow_from_dataframe</code>,</p>
  <p>y_train:</p>
  <pre><code>array([array([0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object),
         array([0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=object)],
        dtype=object)
  </code></pre>
  <p>it returns above result. From this result, my model recognize only one BIG array, not separated array. How can I get normal 2D-shape Numpy array?</p>
  <p>my codes:</p>
  <pre><code>from keras.preprocessing.image import ImageDataGenerator
  gen = ImageDataGenerator(
          rescale=1./255,
          shear_range=0.2,
          zoom_range=0.2,
          rotation_range=20,
          width_shift_range=0.2,
          height_shift_range=0.2,
          horizontal_flip=True)
  </code></pre>
  <p>xray_data['target_vector']</p>
  <pre><code>0         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
  1         [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0]
  2         [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0]
  3         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  4         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
                               ...                    
  112115    [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0]
  112116    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  112117    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  112118    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  112119    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  Name: target_vector, Length: 112120, dtype: object
  </code></pre>
  <pre><code>train_gen = gen.flow_from_dataframe(xray_data, x_col='full_path', y_col='target_vector', class_mode='raw')
  </code></pre>
  <pre><code>X_train, y_train = train_gen.next()
  </code></pre>
  <p>-&gt; above result..</p>
  <p>Thank you for your kind answers!</p>