title: IndexError: invalid index to scalar variable
body: <p>I have created the following function:</p>
  
  <pre><code>def c_min(a,b):
      result= [x - y for x in a for y in b]
      min=np.min(result)
      return min
  </code></pre>
  
  <p>I have created a test file with two lists: </p>
  
  <pre><code>a=[1,2,3] and b=[4,5,6]
  </code></pre>
  
  <p>When I running the function I get the correct result.</p>
  
  <p>However when I run the function in my initial code I have the aforementioned in the title error.
  Have to be noted that the function in the initial code is applied in two arrays. One has size 1 and it is numpy.float64,the other 3 and it is numpy.ndarray. 
  Why it can be applied to list and not in the arrays?</p>