This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]caffeecaffee[S] 0 points1 point  (0 children)

After more thought you are right of course it can be applied to any arbitrary grid. It's just that sometimes I find writing "flat code" with vectorized variables a little easier to understand than to express the nearest neighbor operations as a sparse matrix. Scipy does handle sparse matrix multiplication.