About idx2multi
SmallHedgehog opened this issue · comments
SmallHedgehog commented
Line 80 in 8afd487
It should be (i // self.rows, i % self.cols)
Li Jiaxin commented
I think it is (i // self.cols, i % self.cols)
. The function idx2multi
converts an idx into (i, j) coordinate. Take an example that a grid is 3x5, idx 0 is (0, 0), idx 4 is (0, 4), idx 5 is (1, 0). It is row-major.
On the other hand, if it is column major, it is (i // self.rows, i % self.rows)
.