Storing 2D grid data in a Numpy array #75
BrainAnnex
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The imminent version 1.0RC2 clarifies the storage implementation, and corrects the visualization, for 2D grid data, regarded as bins in the XY Cartesian plane, and stored in a Numpy array.
By way of background, in typical Cartesian coordinates, x increases from left to right, and y increases from bottom to top.
By contrast, Numpy arrays use row-major ordering: array[row, column]. Row indices increase from top to bottom, while column indices increase from left to right.
The following diagram details the approach currently being followed by Life123. This internal storage, where x bin coordinates map to rows and y bin coordinates map to columns, was chosen in part for ease of generalization to 3D.
Display and visualization methods take care of the transformation from the internal array representation to a 2D grid view in the Cartesian plane.

All reactions