Home »
Public Forums »
archive »
Array element deletion
| Array element deletion [message #36389] |
Fri, 12 September 2003 06:17 |
Edd Edmondson
Messages: 50 Registered: January 2003
|
Member |
|
|
Supposing I have a big array and I also have an array containing indices
of unwanted elements. Is there a neat way of removing those elements from
the array?
Attempts using WHERE() have failed for me* and currently I'm looping
through the array of indices and deleting them one at a time - which is
fine when I've only got 20 or 30 of them but I doubt it'll scale well.
* - I tried to make a list of indices that I wanted to keep using
WHERE(indgen(x) ne unwanted) but that only produces the first
n_elements(unwanted) of the correct indices.
--
Edd
|
|
|
|
Current Time: Mon Dec 01 00:45:24 PST 2025
Total time taken to generate the page: 1.36244 seconds