-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong results when nan values occur in inflow driven calculations #4
Comments
All nan in inflow driven calculations are changed to zeros for both inflow and outflow by cohort computations . Fixes stefanpauliuk#4 P.S: maybe the same prob with nan occurs also in stock driven calculations. Do not know since I am not using it
Hi Cardosan, thanks for checking this! Indeed, the dynamic stock model class uses summation and does not check whether any or the inputs is NaN, in which case also NaN is returned as result. Currently I am of the opinion that there should be no such check as the user of the class is responsible for inserting proper numbers. Compare, for example np.dot, which also accepts NaN values. Thanks again! Stefan |
Hey Stephan, Like I was using the class to calculate stocks for several wood products and countries coming from international statistics and several prod either are not consumed in some countries or their production started only recently and it gave me quite some trouble to discover that this was the reason why the results were very strange. |
Hi Stephan,
when there are nan value in the inflow array it gives wrong results (see below).
converting all the nan to 0 in the stock by cohort array this is solved, at least for the inflow driven calculations
The text was updated successfully, but these errors were encountered: