Sebastian Berg <sebast...@sipsolutions.net> wrote: >> Could it be useful for structured arrays? > > Not sure how. The named columns seem like a decent point to me.
NumPy is naming the fields, not the axes, so it might be more useful for Pandas than NumPy. For example if we have an image with r,g,b data, NumPy would not name a 'color' axis with indexes 'r', 'g' and 'b'. But conceptually image[i:m, j:n, field='r'] could be faster than image[i:m, j:n]['r'] or image['r'][i:m, j:n], and perhaps also slightly more readable. I am note sure about nested dtypes in record arrays though... If the possibility of keyword indexing are supported in Python, there is nothing that prevents this Pandas like extension to NumPy arrays: image[i:m, j:n, color='r'] it would require an extension of the current dtype descriptors, in order to tell NumPy among which fields the keyword "color" would select, but it shouldn't be undoable. Sturla _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion