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

Reply via email to