X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11 Aug 2016 05:53 PM by  anon
Data being read into program as NAN
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



Basic Member


Posts:143
Basic Member


--
11 Aug 2016 05:53 PM
    A user has a program with a call to an array of structures called "kp_data". Inside this structure, there are additional structures that need to be accessed to get the data. In the user's code, when it makes the call: "x = kp_data[0:93,955].ngims.he_density" The data contains all NaN values. If the user tries to do plot(x,y) after the "x=kp_data[0:93,955].ngims.he_density" call, the plot fails. However, if the user runs the program to its conclusion the plot is generated without issue.

    Deleted User



    Basic Member


    Posts:143
    Basic Member


    --
    12 Aug 2016 09:24 AM
    I couple of suggestions how to trouble shoot this issue: 1) Break the call "x = kp_data[0:93, 955].ngims.he_density" into multiple calls in order to determine which part of the call might be failing. For example: temp = kp[0:93,955] print, temp[0:5] ;confirm this is working temp_gims = temp.ngims print, tem_gims[0:5] x = tem_gims.he_density print, x[0:5] 2) My guess is that the variable "x" must be defined with something other than NaNs in another part of the code. I would recommend placing a break point in the code and then stepping through it line by line while monitoring this variable to determine where it is being defined.
    You are not authorized to post a reply.