title: bad operand type for abs(): 'list'
body: <p>When calculating the absolute value in each value of an array, I am getting an error related to bad operand type for abs(): 'list'. The part of source code which is failing is the next:</p>
  
  <pre><code>x = amplitudex * sin((2 * pi * (frequency * 1) * t) + phase);
  y = amplitudey * sin((2 * pi * (frequency * 2) * t) + phase);
  z = amplitudez * sin((2 * pi * (frequency * 3) * t) + phase);
  
  w=  0.55* (x + y + z);
  ....
  n = len(w);
  wf = [float(0)] * n;
  for k in range(n):  # For each output element
      s = float(0);
      for t in range(n):  # For each input element
          s += w[t] * cmath.exp(-2j * cmath.pi * t * k / n);
      wf[k] = float(s);
  
  sf = np.linspace(0.0, 1.0/(2.0*numCycles), numSamples/2);
  
  #The calculation of absolute values causes error:
  plot(sf, 2.0/numSamples * abs(wf[0:100]));
  </code></pre>
  
  <p>How can I fix this error in abs function? I got confused with this error :(</p>
  
  <p>Thanks</p>