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

Home » Public Forums » archive » Finding NaNs in arrays - Strange outcome
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Finding NaNs in arrays - Strange outcome [message #92382] Sat, 05 December 2015 04:02 Go to previous message
dmfl0590 is currently offline  dmfl0590
Messages: 17
Registered: December 2015
Junior Member
Hello

I have a 3D array A ( A FLOAT = Array[480, 480, 160]). I wanted to check for NaNs so I had split one 2D array as follows:

A1 = total(A[0:79, 0:79,25])
A2 = total(A[80:159,80:159,25])
A3 = total(A[160:239,160:239,25])
A4 = total(A[240:319,240:319,25])
A5 = total(A[320:399,320:399,25])
A6 = total(A[400:479,400:479,25])

print, 'A1', A1
print, 'A2', A2
print, 'A3', A3
print, 'A4', A4
print, 'A5', A5
print, 'A6', A6

print, 'total',total(A[*,*,25])

PRINT, 'sum',A1+A2+A3+A4+A5+A6

I got the following print results:
A1 682066.
A2 1.51149e+007
A3 9.41048e+006
A4 9.07705e+006
A5 1.18558e+007
A6 62705.1
total NaN
sum 4.62031e+007


Why the total(A[*,*,25]) gave me NaN? Isn't the same thing as the sum?

Can anyone help with this?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ROI of 3D volumes (multiple 2D slices)
Next Topic: Re: IDL_IDLBRIDGE undefined procedure problem

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

Current Time: Wed Oct 08 11:36:32 PDT 2025

Total time taken to generate the page: 0.00472 seconds