PyNN icon indicating copy to clipboard operation
PyNN copied to clipboard

Grid2D positions and distances

Open andrewgait opened this issue 8 years ago • 2 comments

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... !]

andrewgait avatar Oct 09 '17 13:10 andrewgait

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.

apdavison avatar Oct 19 '17 09:10 apdavison

Thanks for the reply - please let me know if you make any changes and I’ll update the SpiNNaker code accordingly :-)

andrewgait avatar Oct 19 '17 10:10 andrewgait