[Numpy-discussion] help me

dileep kunjaai dileepkunjaai at gmail.com
Fri Mar 25 08:08:06 EDT 2011


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


On Fri, Mar 25, 2011 at 5:32 PM, Miguel de Val-Borro <miguel.deval at 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 at 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.python.org/pipermail/numpy-discussion/attachments/20110325/0a00d325/attachment.html>


More information about the NumPy-Discussion mailing list