title: Multiple ranges / np.arange
body: <p>I have two end-point arrays that look like this:</p>
  
  <pre><code>t1 = np.array([0,13,22,...,99994])
  t2 = np.array([4,14,25,...,99998])
  </code></pre>
  
  <p>I am looking for the most efficient way to generate an output that looks like this:</p>
  
  <pre><code>np.array([0,1,2,3,4,13,14,22,23,24,25,...,99994,99995,99996,99997,99998])
  </code></pre>
  
  <p>one way to do it is this:</p>
  
  <pre><code>np.array([i for a, b in zip(t1, t2) for i in range(a, b + 1)])
  </code></pre>
  
  <p>This solution is slow and I am certain that it can still be vastly improved by entirely replacing the zip and list comprehension combo with some functions entirely in Numpy, it is just that I don't know how. Can you guys show me the most efficient way to do it?</p>
  
  <p>Thank you guys in advance</p>
  
  <hr>
  
  <p>Code to generate these two arrays:</p>
  
  <pre><code>import numpy as np
  
  m =10000
  Z = np.arange(0,10*m,10)
  
  t1 = np.random.randint(5, size =m ) + Z
  t2 =np.random.randint(5,size = m) + 5 + Z
  </code></pre>