Benjamin Root writes: > Seems like you are talking about xarray: https://github.com/pydata/xarray
Oh, I wasn't aware of xarray, but there's also this: https://people.gso.ac.upc.edu/vilanova/doc/sciexp2/user_guide/data.html#basic-indexing https://people.gso.ac.upc.edu/vilanova/doc/sciexp2/user_guide/data.html#dimension-oblivious-indexing Cheers, Lluis > Cheers! > Ben Root > On Fri, Feb 12, 2016 at 9:40 AM, Sérgio <filab...@gmail.com> wrote: > Hello, > This is my first e-mail, I will try to make the idea simple. > Similar to masked array it would be interesting to use a label array to > guide operations. > Ex.: >>>> x > labelled_array(data = > [[0 1 2] > [3 4 5] > [6 7 8]], > label = > [[0 1 2] > [0 1 2] > [0 1 2]]) >>>> sum(x) > array([9, 12, 15]) > The operations would create a new axis for label indexing. > You could think of it as a collection of masks, one for each label. > I don't know a way to make something like this efficiently without a loop. > Just wondering... > Sérgio. > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > https://mail.scipy.org/mailman/listinfo/numpy-discussion > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > https://mail.scipy.org/mailman/listinfo/numpy-discussion _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion