title: Any workaround to getting a list to numpy array for keras input data?
body: <p>I'm trying to train a CNN model on keras, my data looks like this</p>
  
  <pre><code>type(datain)
  &lt;class 'list'&gt;
  len(datain)
  35000
  type(datain[0])
  &lt;class 'numpy.ndarray'&gt;
  datain[0].shape
  (256,256,1)
  </code></pre>
  
  <p>And being my input data a list of arrays I get this error when trying to train the network</p>
  
  <pre><code>AttributeError: 'list' object has no attribute 'shape'
  </code></pre>
  
  <p>but when trying to do something like <code>np.array(datain)</code> as suggested here <a href="https://github.com/keras-team/keras/issues/4823" rel="nofollow noreferrer">https://github.com/keras-team/keras/issues/4823</a> my computer freezes/crashes. defining my input using python list takes like 60 seconds in total, but if I try as numpy arrays from the beginning but takes like 1 sec per <code>(256,256,1)</code> array, and is way too much time if I intent of doing various test and modifications to my network,<br>
  is there any work around for this problem?<br>
   any way to use lists for keras?<br>
  a different way to define a numpy array?<br>
  or am I misunderstanding something?</p>