title: memory allocation in numpy.repeat
body: <p>I have a memory leak in my script and I narrowed it down to <code>np.repeat</code>. In theory, if I have some <code>np.array</code> that has it's own pointer called <code>arr</code> and I make an <code>arr_repeated = arr.repeat(10, axis = 0)</code> and then do <code>del</code> on both of them, should the memory occupied by them get freed?</p>
  
  <p>I'm checking with:</p>
  
  <pre><code>psutil.Process(os.getpid()).memory_info().rss 
  </code></pre>
  
  <p>To be more specific, should <code>memory_before</code> and <code>memory_after</code> be different in the following code?</p>
  
  <pre><code>arr = np.array([[1,2,3,...], [...], [...]])
  arr_repeated = arr.repeat(10, axis = 0)
  
  memory_before = psutil.Process(os.getpid()).memory_info().rss 
  
  del arr
  del arr_repeated
  
  memory_after = psutil.Process(os.getpid()).memory_info().rss 
  </code></pre>
  
  <p>I have </p>
  
  <blockquote>
    <p>extra/python-numpy 1.13.1-2 [installed]</p>
  </blockquote>
  
  <p>on my antergos/arch</p>