Open aaarbk opened 3 years ago
Thansk. Did you try with non-equal size arrays to check if it is actually wrong? (I don't remember the exact layout I used)
Yes I did.
You defined the shape of Z as
shape = len(Z), len(Z[0])
so you want N
to be
[[0] * ncols for _ in range(nrows)]
where (nrows, ncols) = shape
I see, thanks. Can you make a PR?
In the
compute_neighbours()
function, I think you meant to doN = [[0,]*(shape[1]) for i in range(shape[0])]
instead ofN = [[0,]*(shape[0]) for i in range(shape[1])]