title: unsupported operand type(s) for +=: 'NoneType' and 'list'
body: <p>Hello  i have written a code to find similarity of images using normalized cross correlation. I am getting the above error and not able to get it.Could anyone find what s my error. Advance Thanks :)</p>
  
  <pre><code>from numpy import *
  from PIL import Image
  from scipy import misc
  import sys
  import math
  import numpy as np
  import scipy.signal
  import cv2
  from cv2 import cv
  path1='D:/PROJECT/database/453.png'
  path2='D:/PROJECT/database/453.png'
  im1=Image.open('D:/PROJECT/database/453.png')
  im2=Image.open('D:/PROJECT/database/453.png')
  #numpart=0
  #denpart=0
  numpart=[0.0,0.0,0.0,0.0]
  denpart=[0.0,0.0,0.0,0.0]
  
  pix1 = im1.load()
  pix2=im2.load()
  width=181
  height=256
  x1= misc.imread(path1)
  x2= misc.imread(path2)
  m1=x1.mean()
  m2=x2.mean()
  #print m2
  for i in range(0,width):
      for j in range (0,height):
          y1=pix1[i,j]
          y2=pix2[i,j]
          nump1z1=y1-m1
          nump2z1=y2-m2
          n=nump1z1*nump2z1
          numpart+=n
          denp1z1=(y1-m1)**2
          denp2z1=(y2-m2)**2
          d=(denp1z1*denp2z1)
          e=map(math.sqrt,d)
          denpart+=e
  ncc=numpart/denpart
  print ncc 
  </code></pre>