title: loop of ufunc does not support argument 0 of type float which has no callable exp method
body: <p>I am having trouble with an optimization that used to work with a previous version of python...</p>
  
  <p>I have a function <code>fp = lambda c, x: (c[0])+ (c[1]*((1- np.exp(-x/c[4]))/(x/c[4])))+ (c[2]*((((1-np.exp(-x/c[4]))/(x/c[4])))- (np.exp(-x/c[4]))))+ (c[3]*((((1-np.exp(-x/c[5]))/(x/c[5])))- (np.exp(-x/c[5]))))
  </code></p>
  
  <p>and I need to minimize the error <code>e = lambda c, x, y: (((fp(c,x)-y)**2).sum())</code></p>
  
  <p>using the initial parameter values <code>p0 = np.array([0.01,0.01,0.01,0.01,0.01,1.00,1.00])</code></p>
  
  <p>basically <code>p = optimize.fmin(e, p0, args=(x,y))</code></p>
  
  <p>were x and y are np.arrays (14,) each.</p>
  
  <p>So, this used to work but now it throws this error <code>TypeError: loop of ufunc does not support argument 0 of type float which has no callable exp method</code></p>
  
  <p>I've done some research and it seems that there is a problem related to <code>np.exp()</code> and some versions of Numpy ... Actually this problem appeared when I updated Python and Numpy as well to 3.7 and 1.18.1 repectively.</p>
  
  <p>Any thoughts?</p>