[ncl-talk] How to delete specific elements in an array
Kyle Griffin
ksgriffin2 at wisc.edu
Fri Nov 14 11:34:01 MST 2014
Hi Ipshita,
That's not possible in NCL. What you can do is either set those values to a
missing value using the 'where' function, or create a new array that only
has those indices from the old array, e.g. if ind_list is your list of
indices,
new_array = old_array(ind_list)
delete(old_array)
Hope that helps,
Kyle
----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
Room 1421
1225 W Dayton St, Madison, WI 53706
Email: ksgriffin2 at wisc.edu
On Fri, Nov 14, 2014 at 11:03 AM, Ipshita Majhi <ipmajhi at alaska.edu> wrote:
> Hi
> I have a list of indices and i want to delete elements in an array which
> match those indices .
> I saw delete but it seems to be deleting the variable
> Thank you in advance
> Best regards
> Ipshita
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141114/ff22e63b/attachment.html
More information about the ncl-talk
mailing list