[SciPy-user] Index of a value

Samuel GARCIA sgarcia at olfac.univ-lyon1.fr
Mon Mar 12 10:17:05 EDT 2007


Hi,
argmax    argmin

Sam

Marek Wojciechowski wrote:
> Hallo!
> Is there any shorthand for:
>
> maxvalue = A.max()
> maxindex = A.tolist().index(maxvalue)
>
> where A is a 1-dimensional numpy array.
>
> Thanks
> Marek
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>   

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Samuel Garcia
Laboratoire de Neurosciences Sensorielles, Comportement, Cognition.
CNRS - UMR5020 - Universite Claude Bernard LYON 1
Equipe logisique et technique
50, avenue Tony Garnier
69366 LYON Cedex 07
FRANCE
Tél : 04 37 28 74 64
Fax : 04 37 28 76 01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the SciPy-User mailing list