title: HDF5 write python array memoryerror,
body: <p>I want to write HDF5 format as 512x424(1channel) image database and multi-label in python (anaconda library) for image regression.
  However, I have some error which is happened when memory allocation as array type.</p>
  
  <pre><code>import h5py
  import numpy as np
  
  cols = 512
  rows = 424
  channel = 1
  total_image = sum(1 for line in open(data_label_list))
  total_size = total_image*rows*cols
  f_train = open(data_label_list)
  lines = f_train.readlines()
  
  data = np.empty((total_image, channel, cols, rows))
  multi_label = np.empty((total_image, 1))
  </code></pre>
  
  <p>==========================================</p>
  
  <pre><code>data = np.empty((total_image, channel, cols, rows))
  "MemoryError"
  </code></pre>
  
  <p>Can I solve this error for large scale database?</p>
  
  <p>add source code :</p>
  
  <pre><code>cnt = 0
  for line in lines:
      line = line.rstrip('\n')
      list_line = line.split(' ')
      im = Image.open(list_line[0])
      row, col = im.size
      pixels = im.load()
      for i in range(row):
          for j in range(col):
              data[cnt, 0,  i, j] = pixels[i, j]
       multi_label[cnt, 0] = list_line[1]
       multi_label[cnt, 1] = list_line[2]
       cnt += 1
  </code></pre>
  
  <p>Thanks,</p>