comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Resizing arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Resizing arrays [message #45556 is a reply to message #45554] Wed, 21 September 2005 10:09 Go to previous messageGo to previous message
Benjamin Luethi is currently offline  Benjamin Luethi
Messages: 22
Registered: December 2004
Junior Member
Hi,

for a 1D-array that has at least 1 element different from 0:
nonzero_values = values[where(values ne 0)]

for 2D/3D/...-arrays it's not so simple and you need to give an
example of what you want to do...

Ben

On Tue, 20 Sep 2005 22:03:34 +0200, Julio <julio@cpa.unicamp.br> wrote:

> Hello,
>
> I have a simple question... I have an array, and inside it I have some
> zero values. I want to resize the array, cutting off the zero values. I
> want to keep only positive values in the new array.
>
> How can I do that... I know it is very simple, but I could not do that.
> :-(
>
> Thanks,
> Julio
>



--
-------------+
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Map Projections with User Defined Ellipsoids (Mars)
Next Topic: Re: Multicolored dashed lines???

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 11:53:53 PST 2025

Total time taken to generate the page: 2.01028 seconds