title: How to change the dtype of an "object" to float32?
body: <p>I'm actually trying to program a Keras Model. In my point of view, a keras Model needs a list of np.arrays as x (or a Numpy Array). In my case x is looking like this:</p>
  <pre><code>print(training.dtype)
  </code></pre>
  <blockquote>
  <p>object</p>
  </blockquote>
  <pre><code>print(training.shape)
  </code></pre>
  <blockquote>
  <p>(406,)</p>
  </blockquote>
  <pre><code>print(training[0].dtype)
  </code></pre>
  <blockquote>
  <p>float64</p>
  </blockquote>
  <pre><code>print(training[0].shape)
  </code></pre>
  <blockquote>
  <p>(5140, 5)</p>
  </blockquote>
  <p>This is the size of my Train data (x). If I want to train the model I get this error:</p>
  <blockquote>
  <p>return array(a, dtype, copy=False, order=order)</p>
  <p>ValueError: setting an array element with a sequence.</p>
  </blockquote>
  <p>That's why I think, I prepared the data wrong. If I want to convert them with .astype to float32, I get the same error.</p>
  <p>Thanks for your help!</p>