Python 3 Migration: TM's not matching

I’m debugging an issue I have with backtracking_tm_cpp2_test.py. I set the verbosity to 10 and I get the following output. Can someone spot what is going wrong?

D:\nupic\src\python\python3\tests\unit\nupic\algorithms>python backtracking_tm_cpp2_test.py
Testing short version

Testing with fixed resource CLA - test max segment and synapses
*** Synapse consistency checking turned on for Cells4 ***
*** Python segment match turned on for Cells4
TM Reset

==== RESET =====

==== RESET =====

==== RESET =====


    ===================================
Pattern: 0 Round: 0 input: [ 1.  1.  1.  1.  1.  0.  0.  1.  1.  0.  0.  0.  0.  1.  0.  0.  0.  1.
  1.  0.  1.  0.  0.  1.  1.  0.  0.  1.  1.  0.]
Active cols: [ 0 1 2 3 4 7 8 13 17 18 20 23 24 27 28]
Previous learn patterns:
Pattern 0: 0 1 2 3 4 7 8 13 17 18 20 23 24 27 28

pamCounter = 0, learnedSeqLength = 1
Starting over:[ 0 1 2 3 4 7 8 13 17 18 20 23 24 27 28](reset was called)
  learned sequence length was: 0
_updateAvgLearnedSeqLength before = 0 prevSeqLength = 0
   after = 0
----- computeEnd summary:
learn: True
numBurstingCols: 0,  curPredScore2: 0,  curFalsePosScore: 0,  1-curFalseNegScore: 1,
numSegments:  0 avgLearnedSeqLength:  0.0
----- infActiveState (0 on) ------
NONE
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
----- infPredictedState (0 on)-----
NONE
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
----- lrnActiveState (2568471157 on) ------
Col 0: [ 0, 1, 2, 3, ]  Col 1: [ 0, 3, ]  Col 2: [ 0, ]  Col 3: [ 1, ]  Col 4: [ 1, 2, ]  Col 5: [ 0, 3, ]  Col 6: [ 0, 3, ]  Col 7: [ 0, 2, 3, 4, ]  Col 8: [ 0, 2, 3, 4, ]  Col 9: [ 0, 1, 2, 3, 4, ]  Col 10: [ 0, 1, 2, 3, 4, ]  Col 11: [ 0, 1, 2, 3, 4, ]  Col 12: [ 0, 1, 2, 3, 4, ]  Col 13: [ 0, 1, 2, 3, 4, ]  Col 14: [ 0, 1, 2, 3, 4, ]  Col 15: [ 0, 1, 2, 3, 4, ]  Col 16: [ 0, 1, 2, 3, 4, ]  Col 17: [ 0, 1, 2, 3, 4, ]  Col 18: [ 0, 1, 2, 3, 4, ]  Col 19: [ 0, 3, 4, ]
11100111567973722304989 372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989221 0000000000
2560025625600003722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049890 0000000000
655360006553600426121625614101607373722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049890 0000000000
16777216167772160001677721616777216372231321321474877443722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049891411078259 0000000000
0000000372230498937223049893722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049892147488000 0000000000
----- lrnPredictedState (268049736 on)-----
Col 7: [ 2, 3, ]  Col 8: [ 2, 3, 4, ]  Col 9: [ 0, 1, 2, 3, 4, ]  Col 10: [ 0, 1, 2, 3, 4, ]  Col 11: [ 0, 1, 2, 3, 4, ]  Col 12: [ 0, 1, 2, 3, 4, ]  Col 13: [ 0, 1, 2, 3, 4, ]  Col 14: [ 0, 1, 2, 3, 4, ]  Col 15: [ 0, 1, 2, 3, 4, ]  Col 16: [ 0, 1, 2, 3, 4, ]  Col 17: [ 0, 1, 2, 3, 4, ]  Col 18: [ 0, 1, 2, 3, 4, ]  Col 19: [ 0, 1, 3, 4, ]  Col 20: [ 0, 1, 2, 3, 4, ]  Col 21: [ 0, 1, 2, 3, 4, ]  Col 22: [ 0, 1, 2, 3, 4, ]  Col 23: [ 0, 1, 2, 3, 4, ]  Col 24: [ 0, 1, 2, 3, 4, ]  Col 25: [ 0, 1, 2, 3, 4, ]  Col 26: [ 0, 1, 2, 3, 4, ]  Col 27: [ 0, 1, 2, 3, 4, ]  Col 28: [ 0, 1, 2, 3, 4, ]  Col 29: [ 0, 1, 2, 3, 4, ]
0000000003722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
0000000003722304989 37223049893722304989372230498937223049893722304989372230498937223049893722304989372230498956797 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
0000000426121625614388654513722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049890 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
00000006502121474890243722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049891439782965 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
0000000037223049893722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049892147489280 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
----- cellConfidence -----
NONE
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
----- colConfidence -----
NONE
----- cellConfidence[t-1] for currently active cells -----
NONE
Cells, all segments:
--- ALL CELLS ---
Activation threshold= 8 min threshold= 8 connected perm= 0.5


==== PY Iteration: 1 =====
Active cols: [ 0  1  2  3  4  7  8 13 17 18 20 23 24 27 28]
Previous learn patterns:

[array([ 0,  1,  2,  3,  4,  7,  8, 13, 17, 18, 20, 23, 24, 27, 28], dtype=int64)]
pamCounter =  0 seqLength =  1
Starting over: [ 0  1  2  3  4  7  8 13 17 18 20 23 24 27 28] (reset was called)
  learned sequence length was: 0
----- computeEnd summary:
learn: True
numBurstingCols: 0,  curPredScore2: 0,  curFalsePosScore: 0,  1-curFalseNegScore: 1,
numSegments:  0 avgLearnedSeqLength:  0.0
----- infActiveState (0 on) ------
NONE
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
----- infPredictedState (0 on)-----
NONE
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
----- lrnActiveState (15 on) ------
Col 0: [ 0, ]  Col 1: [ 0, ]  Col 2: [ 0, ]  Col 3: [ 0, ]  Col 4: [ 0, ]  Col 7: [ 0, ]  Col 8: [ 0, ]  Col 13: [ 0, ]  Col 17: [ 0, ]  Col 18: [ 0, ]  Col 20: [ 0, ]  Col 23: [ 0, ]  Col 24: [ 0, ]  Col 27: [ 0, ]  Col 28: [ 0, ]
1111100110 0001000110 1001100110
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
----- lrnPredictedState (0 on)-----
NONE
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
0000000000 0000000000 0000000000
----- cellConfidence -----
NONE
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000    0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
----- colConfidence -----
NONE
----- cellConfidence[t-1] for currently active cells -----
NONE
Cells, all segments:
--- ALL CELLS ---
Activation threshold= 8 min threshold= 8 connected perm= 0.5


   ------  CPP states  ------
Inference Active state
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
Inference Predicted state
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000

Learn Active state
0000000000 0000000000 199861145605039132761150236219032761050200  11100111567973722304989 372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989221 0000000000
0000000000 0000000000 502042612812772723276119985126240000  2560025625600003722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049890 0000000000
0000000426121625614186805510 0000000000 199851257611997429272015023518805020019986023280  655360006553600426121625614101607373722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049890 0000000000
00000006502121474854400 0000000001419598065 5021605021327610005020  16777216167772160001677721616777216372231321321474877443722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049891411078259 0000000000
0000000000 0000000002348812288 0015060606160150237969501998515104000  0000000372230498937223049893722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049892147488000 0000000000
Learn Predicted state
0000000056797502 0426128127792032761199862281600000 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989  0000000003722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
0000000001998622768 119974406000150236722050200199860527204261281277 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989  0000000003722304989 37223049893722304989372230498937223049893722304989372230498937223049893722304989372230498956797 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
000000042612162561435195363502 16050213276100050200 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989  0000000426121625614388654513722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049890 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
0000000372231321323488166400 0150605206401502369935019986236960001436112877 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989  00000006502121474890243722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049891439782965 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989
0000000372230498919986094400 511343276115023621903276105020072147490304 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989  0000000037223049893722304989 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049892147489280 3722304989372230498937223049893722304989372230498937223049893722304989372230498937223049893722304989

   ------  PY states  ------
Inference Active state
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
Inference Predicted state
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000

Learn Active state
0000000000 0000000000 0000000000  1111100110 0001000110 1001100110
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
Learn Predicted state
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
0000000000 0000000000 0000000000  0000000000 0000000000 0000000000
C++ cells:
--- ALL CELLS ---
Activation threshold= 8 min threshold= 8 connected perm= 0.5
PY cells:
--- ALL CELLS ---
Activation threshold= 8 min threshold= 8 connected perm= 0.5
Num segments in PY and C++ 0 0
lrnActiveState[t] diverged (array([ 0,  0,  0,  1,  3,  3,  4,  4,  4,  5,  5,  6,  6,  7,  7,  7,  8,
        8,  8,  8,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 11, 11, 11, 11,
       11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15,
       15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18,
       18, 18, 19, 19, 19, 20, 23, 24, 27, 28], dtype=int64), array([1, 2, 3, 3, 0, 1, 0, 1, 2, 0, 3, 0, 3, 2, 3, 4, 0, 2, 3, 4, 0, 1, 2,
       3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0,
       1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3,
       4, 0, 3, 4, 0, 0, 0, 0, 0], dtype=int64))
lrnPredictedState[t] diverged (array([ 7,  7,  8,  8,  8,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 11, 11,
       11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14,
       14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18,
       18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21,
       21, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 25,
       25, 25, 25, 25, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 28, 28, 28,
       28, 28, 29, 29, 29, 29, 29], dtype=int64), array([2, 3, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2,
       3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0,
       1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4,
       0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2,
       3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4], dtype=int64))
F
======================================================================
FAIL: testTMs (__main__.BacktrackingTMCPP2Test)
Call basicTest2 with multiple parameter settings and ensure the C++ and
----------------------------------------------------------------------
Traceback (most recent call last):
  File "backtracking_tm_cpp2_test.py", line 271, in testTMs
    self.basicTest2(tm, numPatterns=15, numRepetitions=1)
  File "backtracking_tm_cpp2_test.py", line 182, in basicTest2
    self.assertTrue(fdrutils.tmDiff2(tm, tmPy, verbosity, False))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 1 test in 0.223s

FAILED (failures=1)

D:\nupic\src\python\python3\tests\unit\nupic\algorithms>