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 #45554 is a reply to message #45552] Wed, 21 September 2005 11:32 Go to previous messageGo to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Well, in 2D the equivalent would be to remove rows/columns that are all
zero. TOTAL(ABS()) should do the trick. Haje


"Benjamin Luethi" <luethi@phim.unibe.ch> wrote in message
news:op.sxgpyegso9wlc0@elara...
> 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 12:15:05 PST 2025

Total time taken to generate the page: 1.60747 seconds