title: Sympy error: loop of ufunc does not support argument 0 of type Mul which has no callable log method
body: <p>I have the following code: </p>
  
  <pre><code>import numpy as np
  import scipy.stats as si
  import sympy as sy
  
  def price(S, K, T, r, vol, call=True):
      d1 = (np.log(S / K) + (r + 0.5 * vol ** 2) * T) / (vol * np.sqrt(T))
      d2 = (np.log(S / K) + (r - 0.5 * vol ** 2) * T) / (vol * np.sqrt(T))
      if call:
          price = (S * si.norm.cdf(d1, 0.0, 1.0) - K * np.exp(-r * T) * si.norm.cdf(d2, 0.0, 1.0))
      else:
          price = (K * np.exp(-r * T) * si.norm.cdf(-d2, 0.0, 1.0) - S * si.norm.cdf(-d1, 0.0, 1.0))
      return price
  
  p,S,K,T,r, vol, call = sy.symbols('p S K T r vol call')
  exp = p - price(S, K, T, r, vol, call)
  </code></pre>
  
  <p>When i run this i get the following error: loop of ufunc does not support argument 0 of type Mul which has no callable log method</p>
  
  <p>When i checked online there was mention of not scoping my log function but I have done this so this is not the problem. Can anyone see what I am doing wrong?</p>