[Numpy-discussion] Numpy Enhancement Proposal: group_by functionality

Stéfan van der Walt stefan at sun.ac.za
Sun Jan 26 12:02:40 EST 2014


Hi Eelco

On Sun, 26 Jan 2014 12:20:04 +0100, Eelco Hoogendoorn wrote:
> key1 = list('abaabb')
> key2 = np.random.randint(0,2,(6,2))
> values = np.random.rand(6,3)
> print group_by((key1, key2)).median(values)

I agree that group_by functionality could be handy in numpy.
In the above example, what would the output of

``group_by((key1, key2))``

be?

Stéfan




More information about the NumPy-Discussion mailing list