{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/203","repository_url":"https://api.github.com/repos/JuliaOpt/Optim.jl","labels_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/203/comments","events_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/203/events","html_url":"https://github.com/JuliaOpt/Optim.jl/issues/203","id":156113657,"number":203,"title":"extended_trace=true fails for NM","user":{"login":"RossBoylan","id":2514994,"avatar_url":"https://avatars.githubusercontent.com/u/2514994?v=3","gravatar_id":"","url":"https://api.github.com/users/RossBoylan","html_url":"https://github.com/RossBoylan","followers_url":"https://api.github.com/users/RossBoylan/followers","following_url":"https://api.github.com/users/RossBoylan/following{/other_user}","gists_url":"https://api.github.com/users/RossBoylan/gists{/gist_id}","starred_url":"https://api.github.com/users/RossBoylan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RossBoylan/subscriptions","organizations_url":"https://api.github.com/users/RossBoylan/orgs","repos_url":"https://api.github.com/users/RossBoylan/repos","events_url":"https://api.github.com/users/RossBoylan/events{/privacy}","received_events_url":"https://api.github.com/users/RossBoylan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-21T17:48:15Z","updated_at":"2016-05-21T22:27:12Z","closed_at":null,"body":"```\r\njulia> @time sol2 = optimize(RB.mylike, RB.troubleParamsInit.raw, iterations=5, store_trace=true, extended_trace=true)  # Nelder Mead\r\n Iter     Function value   Gradient norm\r\n ERROR: UndefVarError: x not defined\r\n  [inlined code] from /home/ross/.julia/v0.4/Optim/src/nelder_mead.jl:28\r\n  in optimize at /home/ross/.julia/v0.4/Optim/src/nelder_mead.jl:89\r\n  in optimize at /home/ross/.julia/v0.4/Optim/src/optimize.jl:25\r\n```\r\nThe relevant code is in the macro definition (in nelder_mead.jl)\r\n```\r\nmacro nmtrace()\r\n    quote\r\n        if tracing\r\n            dt = Dict()\r\n            if o.extended_trace\r\n                dt[\"x\"] = copy(x)\r\n            end\r\n            grnorm = NaN\r\n            update!(tr,\r\n                    iteration,\r\n                    f_x,\r\n                    grnorm,\r\n                    dt,\r\n                    o.store_trace,\r\n                    o.show_trace,\r\n                    o.show_every,\r\n                    o.callback)\r\n        end\r\n    end\r\nend\r\n\r\n```\r\nIt's not immediately obvious to me what should go in place of x in copy(x)."},"comment":{"url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/comments/220803620","html_url":"https://github.com/JuliaOpt/Optim.jl/issues/203#issuecomment-220803620","issue_url":"https://api.github.com/repos/JuliaOpt/Optim.jl/issues/203","id":220803620,"user":{"login":"pkofod","id":8431156,"avatar_url":"https://avatars.githubusercontent.com/u/8431156?v=3","gravatar_id":"","url":"https://api.github.com/users/pkofod","html_url":"https://github.com/pkofod","followers_url":"https://api.github.com/users/pkofod/followers","following_url":"https://api.github.com/users/pkofod/following{/other_user}","gists_url":"https://api.github.com/users/pkofod/gists{/gist_id}","starred_url":"https://api.github.com/users/pkofod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkofod/subscriptions","organizations_url":"https://api.github.com/users/pkofod/orgs","repos_url":"https://api.github.com/users/pkofod/repos","events_url":"https://api.github.com/users/pkofod/events{/privacy}","received_events_url":"https://api.github.com/users/pkofod/received_events","type":"User","site_admin":false},"created_at":"2016-05-21T22:27:12Z","updated_at":"2016-05-21T22:27:12Z","body":"I agree, and I'd be happy to take a shot at it."}}
{"actor":{"display_login":"pkofod"}}