Solved by promach in post #2 
              
              
                Solved by using out-of-place operation for the following lines of code: 
                        graph.cells[c].nodes[n].connections[cc].combined_feature_map = \
                            graph.cells[c].nodes[n].connections[cc].combined_feature_map + \
                            graph.cells[c].no…