[Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

Rob Speer rspeer@MIT....
Thu Jul 8 19:20:50 CDT 2010


> I think we have to start from the nD case, even if I (and I think most
> users) will tend to think in 2D.  The rest is just going to have to be
> up to developers how they want users to interact with what we, the
> developers, see as axes.  No end-user wants to think about the 6th
> axis of the data, but I don't want to be pegged into rows and columns
> thinking because I don't think it works for the below example.

In a lot of tasks, you can get by with just two axes of data, and it
is intuitive to refer to them as "rows" and "columns". If you have
more than two axes, then ideally you give them particular labels, or
otherwise you can still call them axes[0], axes[1], axes[2], etc.

But the question is, if we have convenient names like this for
matrices, should .row on a 3-d array raise an error, or should it give
you axes[0] even though that's more like a plane than a row?
-- Rob


More information about the NumPy-Discussion mailing list