Skip to content

Commit 9925ef9

Browse files
committed
Fix computing flat index from wrong matrix in SpatialPooler#getNeighborsND
1 parent bfd7a6a commit 9925ef9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/numenta/nupic/algorithms/SpatialPooler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ public TIntArrayList getNeighborsND(Connections c, int columnIndex, SparseMatrix
784784
TIntArrayList neighbors = new TIntArrayList(neighborList.size());
785785
int size = neighborList.size();
786786
for(int i = 0;i < size;i++) {
787-
int flatIndex = c.getInputMatrix().computeIndex(neighborList.get(i), false);
787+
int flatIndex = topology.computeIndex(neighborList.get(i), false);
788788
if(flatIndex == columnIndex) continue;
789789
neighbors.add(flatIndex);
790790
}

0 commit comments

Comments
 (0)