quick numpy-related question.
I want to use numpy.arange() to create multiple arrays, and then I want to join
these arrays (or individual elements) to the final array without repeating
existing elements (create a 'union' from 2 or more arrays or individual
elements).
example:
lev=np.arange(0,20,2)
# lev=(0,2,4,6,8,...,20)
lev1=np.arange(0,18,3)
#lev1=(0,3,6,9,12,15,18)
#I want something like...
lev3=lev1+lev2
#WITHOUT repeating elements (i.e., only one '12' in resulting array), i.e., I
want:
#lev3=(0,2,3,4,6,8,9,10,12,14,15,16,18,20)
#or, add just a unique element(s)
lev4=lev3+(50,60)
#so I would want lev4 to look like this:
#lev4=(0,2,3,4,6,8,9,10,12,14,15,16,18,20,50,60)
are these types of operations possible using numpy?
How can this be done?
Please help
Thanks,
P.Romero
_________________________________________________________________
Windows Live™ Contacts: Organize your contact list.
http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users