title: keep getting 'only length-1 arrays can be converted to python scalars'
body: <p>I keep getting the error <code>only length-1 arrays can be converted to Python scalars</code>. I am getting error due to the variable 'uc' as it is an array of 214 elements.</p>
  
  <p>The error states:</p>
  
  <pre><code>  File "/home/lokesh/PycharmProjects/Cross_Range_Imaging/Cross_Range.py", line 68, in &lt;module&gt;
      dis = cmath.sqrt(Xc ** 2 + (Yc + yn[i] - uc) ** 2)
  TypeError: only length-1 arrays can be converted to Python scalars
  </code></pre>
  
  <p>Tried code:</p>
  
  <pre><code>
  import math
  import cmath
  import numpy as np
  
  cj = cmath.sqrt(-1)
  pi2 = 2 * cmath.pi
  c = 3e8
  fc = 200e6
  Xc = 1e3
  Yc = 0
  Y0 = 100
  L = 400
  theta_c = cmath.atan(Yc / Xc)
  L_min = max(Y0, L)
  lamda = c / fc
  Xcc = Xc / np.power(np.cos(theta_c),2)
  duc = (Xcc * lamda) / (4 * Y0)
  mc = 2 * math.ceil(L_min / duc)
  uc = duc * np.arange(-mc / 2, mc/2)
  k = pi2 / lamda
  
  yn = [0, 70, 66.2500, -80]
  fn = [1, 1, 1, 1]
  ntarget = 4
  s = np.zeros((1, mc))
  
  for i in np.arange(ntarget):
      dis = cmath.sqrt(Xc ** 2 + (Yc + yn[i] - uc) ** 2)
      s = s + np.multiply(fn[i] * np.exp(-cj * 2 * k * dis), (abs(uc) &lt;= L))
  
  </code></pre>
  
  <p>The expected result values of variable 'dis' are <code>1x214 double</code> and variable 's' are <code>1x214 complex double</code></p>