[Numpy-discussion] help me

dileep kunjaai dileepkunjaai@gmail....
Fri Mar 25 07:08:06 CDT 2011


Thank you sir,,,,,,, Thank you very much.....


On Fri, Mar 25, 2011 at 5:32 PM, Miguel de Val-Borro <miguel.deval@gmail.com
> wrote:

> 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
>



-- 
DILEEPKUMAR. R
J R F, IIT DELHI
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110325/0a00d325/attachment.html 


More information about the NumPy-Discussion mailing list