title: TypeError: 'builtin_function_or_method' object is not subscriptable for python
body: <p>I'm writing some code to Medial Axis Transform and got some type error
  for my array.</p>
  
  <pre><code>import cv2 
  import numpy as np
  
  img = cv2.imread('cvSmall.png',0)
  print(img.shape)
  thresh = 230
  maxValue = 255
  th, dst = cv2.threshold(img, thresh, maxValue, cv2.THRESH_BINARY_INV);
  
  cv2.imshow('image',dst)
  
  fZero = np.zeros((len(dst),len(dst[0])))
  
  for y in range(0,len(dst)-1):
          for x in range(0,len(dst[0])-1):
              if dst[y][x] == 255:
                  fZero[y][x] = 1
  
  print(fZero.shape)
  
  global currentF
  global nextF
  currentF = np.zeros((len(dst),len(dst[0])))
  currentF =  fZero.copy
  nextF = np.zeros((len(dst),len(dst[0])))
  
  def iterationFunction():
      for y in range(1,len(dst)-2):
          for x in range(1,len(dst[0])-2):
              nextF[y][x] += fZero[y][x]
              nextF[y][x] +=  min((currentF[y-1][x]), (currentF[y+1][x]), (currentF[y][x-1]),(currentF[y][x+1]))
  #Error in this line
  
      print (nextF)
  
  iterationFunction()
  </code></pre>
  
  <p>And this is the error I'm getting:</p>
  
  <blockquote>
    <p>line 37, in iterationFunction
        nextF[y][x] +=  min((currentF[y-1][x]), (currentF[y+1][x]), (currentF[y][x-1]),(currentF[y][x+1])) </p>
    
    <p>TypeError:
    'builtin_function_or_method' object is not subscriptable</p>
  </blockquote>