title: Problem with the comparison function, I think it's not reading all the sample correctly. Any tips?
body: <p>I'm very noob at image recognition but was following sendtex's video series. The program worked up until video 9/10 where a function is built to compare sample images to the image being assessed. Here's the video ->  <a href="https://www.youtube.com/watch?v=ry9AzwTMwJQ" rel="nofollow noreferrer">https://www.youtube.com/watch?v=ry9AzwTMwJQ</a></p>
  
  <p>I think the problem might be in the "whatNumIsThis" function. I tested the Counter tool shown at 15:53 in the video and the counter works fine. It might be a problem appending the variable "matchedAr" with the variable "currentNum". Or a problem with another one of the variables in that function, I tested the other functions up to that point just printing results at every step and they worked correctly.</p>
  
  <pre class="lang-py prettyprint-override"><code>
  def whatNumIsThis(filePath):
      matchedAr = []
      loadExamps = open('numArEx.txt','r').read()
      loadExamps = loadExamps.split('\n')
  
      i = Image.open(filePath)
      iar = np.array(i)
      iarl = iar.tolist()
  
      inQuestion = str(iarl)
  
      for eachExample in loadExamps:
          if len(eachExample) &gt; 3:
              splitEx = eachExample.split('::')
              currentNum = splitEx[0]
              currentAr = splitEx[1]
  
              eachPixEx = currentAr.split('],')
  
              eachPixInQ = inQuestion.split('],')
  
              x = 0
  
              while x &lt; len(eachPixEx):
                  if eachPixEx[x] == eachPixInQ[x]:
                      matchedAr.append(int(currentNum))
  
                  x += 1
  
      print (matchedAr)
      x = Counter(matchedAr)
      print (x)
  
  </code></pre>
  
  <p>There is no error message, instead it returns a counter of 1s, like this - </p>
  
  <pre class="lang-py prettyprint-override"><code>
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
  Counter({1: 100})
  
  </code></pre>
  
  <p>I've checked the numArEx.txt file and it has all the samples it should, not just samples of number "1". I expected it to return a count of all instances of numbers available, not just "1". Not sure what to do.</p>