{"action":"created","issue":{"url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/78","labels_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/78/comments","events_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/78/events","html_url":"https://github.com/QuantEcon/QuantEcon.jl/pull/78","id":115307126,"number":78,"title":"Add Discrete DP","user":{"login":"mmcky","id":8263752,"avatar_url":"https://avatars.githubusercontent.com/u/8263752?v=3","gravatar_id":"","url":"https://api.github.com/users/mmcky","html_url":"https://github.com/mmcky","followers_url":"https://api.github.com/users/mmcky/followers","following_url":"https://api.github.com/users/mmcky/following{/other_user}","gists_url":"https://api.github.com/users/mmcky/gists{/gist_id}","starred_url":"https://api.github.com/users/mmcky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmcky/subscriptions","organizations_url":"https://api.github.com/users/mmcky/orgs","repos_url":"https://api.github.com/users/mmcky/repos","events_url":"https://api.github.com/users/mmcky/events{/privacy}","received_events_url":"https://api.github.com/users/mmcky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-11-05T15:24:15Z","updated_at":"2015-11-10T02:11:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/pulls/78","html_url":"https://github.com/QuantEcon/QuantEcon.jl/pull/78","diff_url":"https://github.com/QuantEcon/QuantEcon.jl/pull/78.diff","patch_url":"https://github.com/QuantEcon/QuantEcon.jl/pull/78.patch"},"body":"**Status:** Not Ready to be Merged, Open for Review\r\n\r\nAdd Discrete DP\r\n  - value iteration\r\n  - policy function iteration \r\n  - modified policy function iteration\r\n\r\nOutstanding items\r\n  - [ ] Preliminary tests have been translated but do not yet run. They need a ``julian`` review. The file is currently documented with ``TODO``.\r\n  - [ ] State-Action Pair Formulation\r\n  - [ ] Sparse Matrix Support\r\n  - [ ] Docstring cleanup\r\n\r\nI will submit an associated PR for the QuantEcon website to add ``julia`` lecture"},"comment":{"url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/comments/155260894","html_url":"https://github.com/QuantEcon/QuantEcon.jl/pull/78#issuecomment-155260894","issue_url":"https://api.github.com/repos/QuantEcon/QuantEcon.jl/issues/78","id":155260894,"user":{"login":"oyamad","id":7353083,"avatar_url":"https://avatars.githubusercontent.com/u/7353083?v=3","gravatar_id":"","url":"https://api.github.com/users/oyamad","html_url":"https://github.com/oyamad","followers_url":"https://api.github.com/users/oyamad/followers","following_url":"https://api.github.com/users/oyamad/following{/other_user}","gists_url":"https://api.github.com/users/oyamad/gists{/gist_id}","starred_url":"https://api.github.com/users/oyamad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyamad/subscriptions","organizations_url":"https://api.github.com/users/oyamad/orgs","repos_url":"https://api.github.com/users/oyamad/repos","events_url":"https://api.github.com/users/oyamad/events{/privacy}","received_events_url":"https://api.github.com/users/oyamad/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T02:11:29Z","updated_at":"2015-11-10T02:11:29Z","body":"The problem seems to be in `s_wise_max!`:\r\n\r\n```julia\r\njulia> vals = [5 10; -1 -Inf]\r\n2x2 Array{Float64,2}:\r\n  5.0    10.0\r\n -1.0  -Inf  \r\n\r\njulia> Tv = Vector{Float64}(2);\r\n\r\njulia> sigma = Vector{Int64}(2);\r\n\r\njulia> DDP.s_wise_max!(vals, Tv, sigma)\r\n([10.0,-1.0],[3,2])\r\n\r\njulia> sigma\r\n2-element Array{Int64,1}:\r\n 3\r\n 2\r\n\r\n```\r\n"}}