title: Memory error for numpy operations: How do I bypass this?
body: <p>I am working with a large array of positive numbers, say <code>num_arrays</code>. For example the shape of my numpy array is <code>num_arrays.shape = (10, 10, 3000, 100, 50)</code>. Now I have a function defined as</p>
  
  <pre><code>def func(x):
     return np.exp(-x**2)*np.sqrt(x)
  </code></pre>
  
  <p>When I call </p>
  
  <pre><code>func(num_arrays)
  </code></pre>
  
  <p>it returns me <code>MemoryError</code>. I understand that this is because my array size is too large, but is there any ideas as to how I can avoid this error and still achieve my results? </p>