On Fri, Mar 25, 2011 at 05:28:50PM +0530, dileep kunjaai wrote:
> Dear sir,
>  I have a numpy array,,. in which i have to choose only different values
> only,
> For example
> 
>     Let A= [ 20.  21.  22.  23.  24.  25.  20.  21.  22.  23.  24.  25.
> 20.  21.  22. 23.  24.  25.  20.  21.  22.  23.  24.  25.  20.  21.  22.
> 23.  24.  25.]
>  then
>  the answer is [20, 21.  22.  23.  24.  25.] ie choose only different values

Try the numpy.unique function:

>>> numpy.unique(A)
array([20, 21.  22.  23.  24.  25.])

Miguel
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to