title: Only length-1 arrays can be converted to Python scalars with log
body: <pre><code>from numpy import * 
  from pylab import * 
  from scipy import * 
  from scipy.signal import * 
  from scipy.stats import * 
  
  
  testimg = imread('path')  
  
  hist = hist(testimg.flatten(), 256, range=[0.0,1.0])[0]
  hist = hist + 0.000001
  prob = hist/sum(hist)
  
  
  entropia = -1.0*sum(prob*log(prob))#here is error
  print 'Entropia: ', entropia
  </code></pre>
  
  <p>I have this code and I do not know what could be the problem, thanks for any help</p>