Grid2D positions and distances
I am probably misunderstanding something here, but it seems to me as though Grid2D.generate_positions(n) returns a (3,sqrt(n)) array, whereas then Space.distances(A, B, ...) is expecting an (N,3) array (at least for array A), which in all examples I've seen is supposed to be a position array from a population with a grid structure. Is this a bug or am I doing something wrong?
[NB I can get round it by transposing the arrays I get from Grid2D.generate_positions(...), but I figured that wasn't quite what was intended... !]
The transposition is indeed necessary. There were good reasons for this, but I have forgotten what they are :-(
We should review this behaviour before releasing version 1.0.
Thanks for the reply - please let me know if you make any changes and I’ll update the SpiNNaker code accordingly :-)