title: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any()
body: <p>Here's my code:</p>
  
  <pre><code>from scipy.io import wavfile
  
  fName = 'file.wav'
  
  fs, signal = wavfile.read(fName)
  signal = signal / max(abs(signal))                 # scale signal
  assert min(signal) &gt;= -1 and max(signal) &lt;= 1
  </code></pre>
  
  <p>And the error is:</p>
  
  <pre><code>Traceback (most recent call last):
    File = "vad.py", line 10, in &lt;module&gt;
      signal = signal / max(abs(signal))
  ValueError: The truth value of an array with more than one element is ambiguous. Use a.any()
  </code></pre>
  
  <p>Can anyone please help me solving this error..?</p>
  
  <p>Thanks in advance..</p>