title: How to convert 2D arrays in dictionary into one single array?
body: <p>I have the following code:</p>
  <pre><code>import random
  import numpy as np
  import pandas as pd
  
  num_seq = 100
  len_seq = 20
  nts = 4
  sequences = np.random.choice(nts, size = (num_seq, len_seq), replace=True)
  sequences = np.unique(sequences, axis=0) #sorts the sequences
  
  d = {}
  pr = 5
  
  for i in range(num_seq):
      globals()['seq_' + str(i)] = np.tile(sequences[i,:],(pr,1))
      d['seq_' + str(i)] = np.tile(sequences[i,:],(pr,1))
  
  pool = np.empty((0,len_seq),dtype=int)
  for i in range(num_seq):
      pool = np.concatenate((pool,eval('seq_' +str(i))))
  </code></pre>
  <p>I want to convert the dictionary <code>d</code> into a Numpy array (or a dictionary with just one entry). My code works, producing <code>pool</code>. However, at bigger values for <code>num_seq</code>, <code>len_seq</code> and <code>pr</code>, it takes a very long time.</p>
  <p>The execution time is critical, thus my question: is there a more efficient way of doing this?</p>