[Numpy-discussion] equality with masked object

Sasha ndarray at mac.com
Thu Apr 27 08:57:07 EDT 2006


On 4/27/06, Lionel Roubeyrie <lroubeyrie at limair.asso.fr> wrote:
>[....................]  I want to obtain the index of
> the max value in each column of a 2d masked array, then how can I do that
> without comparaison?

ma.argmax(x, axis=0, fill_value=ma.maximum_fill_value(x))

or better:

argmax(x.fill(ma.maximum_fill_value(x)), axis=0)




More information about the NumPy-Discussion mailing list