[SciPy-user] Index of a value

Samuel GARCIA sgarcia@olfac.univ-lyon1...
Mon Mar 12 09:17:05 CDT 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@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