{"action":"created","issue":{"url":"https://api.github.com/repos/casadi/casadi/issues/1618","labels_url":"https://api.github.com/repos/casadi/casadi/issues/1618/labels{/name}","comments_url":"https://api.github.com/repos/casadi/casadi/issues/1618/comments","events_url":"https://api.github.com/repos/casadi/casadi/issues/1618/events","html_url":"https://github.com/casadi/casadi/issues/1618","id":111180442,"number":1618,"title":"Broken printing of if_else expressions","user":{"login":"toivoh","id":1627007,"avatar_url":"https://avatars.githubusercontent.com/u/1627007?v=3","gravatar_id":"","url":"https://api.github.com/users/toivoh","html_url":"https://github.com/toivoh","followers_url":"https://api.github.com/users/toivoh/followers","following_url":"https://api.github.com/users/toivoh/following{/other_user}","gists_url":"https://api.github.com/users/toivoh/gists{/gist_id}","starred_url":"https://api.github.com/users/toivoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toivoh/subscriptions","organizations_url":"https://api.github.com/users/toivoh/orgs","repos_url":"https://api.github.com/users/toivoh/repos","events_url":"https://api.github.com/users/toivoh/events{/privacy}","received_events_url":"https://api.github.com/users/toivoh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/casadi/casadi/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"jaeandersson","id":2487645,"avatar_url":"https://avatars.githubusercontent.com/u/2487645?v=3","gravatar_id":"","url":"https://api.github.com/users/jaeandersson","html_url":"https://github.com/jaeandersson","followers_url":"https://api.github.com/users/jaeandersson/followers","following_url":"https://api.github.com/users/jaeandersson/following{/other_user}","gists_url":"https://api.github.com/users/jaeandersson/gists{/gist_id}","starred_url":"https://api.github.com/users/jaeandersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaeandersson/subscriptions","organizations_url":"https://api.github.com/users/jaeandersson/orgs","repos_url":"https://api.github.com/users/jaeandersson/repos","events_url":"https://api.github.com/users/jaeandersson/events{/privacy}","received_events_url":"https://api.github.com/users/jaeandersson/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/casadi/casadi/milestones/13","html_url":"https://github.com/casadi/casadi/milestones/Version%203.0","labels_url":"https://api.github.com/repos/casadi/casadi/milestones/13/labels","id":1072673,"number":13,"title":"Version 3.0","description":"Release 3.0 consolidates and extends the syntax changes from 2.4 and previous releases. With this release, CasADi should enter a new stage of maturity and hopefully stability.","creator":{"login":"jaeandersson","id":2487645,"avatar_url":"https://avatars.githubusercontent.com/u/2487645?v=3","gravatar_id":"","url":"https://api.github.com/users/jaeandersson","html_url":"https://github.com/jaeandersson","followers_url":"https://api.github.com/users/jaeandersson/followers","following_url":"https://api.github.com/users/jaeandersson/following{/other_user}","gists_url":"https://api.github.com/users/jaeandersson/gists{/gist_id}","starred_url":"https://api.github.com/users/jaeandersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaeandersson/subscriptions","organizations_url":"https://api.github.com/users/jaeandersson/orgs","repos_url":"https://api.github.com/users/jaeandersson/repos","events_url":"https://api.github.com/users/jaeandersson/events{/privacy}","received_events_url":"https://api.github.com/users/jaeandersson/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":58,"state":"open","created_at":"2015-04-17T19:05:14Z","updated_at":"2016-01-21T17:20:38Z","due_on":"2016-01-31T23:00:00Z","closed_at":null},"comments":11,"created_at":"2015-10-13T13:32:28Z","updated_at":"2016-01-22T14:44:33Z","closed_at":"2016-01-19T17:37:49Z","body":"With CasADi 2.4.0 I get strange results when trying to print `if_else` expressions where the consequent or alternative are constants. It seems that printing just leaves these out in those cases. For example,\r\n\r\n    from casadi import *\r\n    x,y,z = map(MX.sym,\"xyz\")\r\n    print if_else(x,y,z)\r\n    print if_else(x,1,z)\r\n    print if_else(x,y,2)\r\n    print if_else(x,1,2)\r\n\r\nprints\r\n\r\n    if_else(x, y, z){0}\r\n    if_else(x, z){0}\r\n    if_else(x, y){0}\r\n    if_else(x){0}\r\n"},"comment":{"url":"https://api.github.com/repos/casadi/casadi/issues/comments/173938707","html_url":"https://github.com/casadi/casadi/issues/1618#issuecomment-173938707","issue_url":"https://api.github.com/repos/casadi/casadi/issues/1618","id":173938707,"user":{"login":"jaeandersson","id":2487645,"avatar_url":"https://avatars.githubusercontent.com/u/2487645?v=3","gravatar_id":"","url":"https://api.github.com/users/jaeandersson","html_url":"https://github.com/jaeandersson","followers_url":"https://api.github.com/users/jaeandersson/followers","following_url":"https://api.github.com/users/jaeandersson/following{/other_user}","gists_url":"https://api.github.com/users/jaeandersson/gists{/gist_id}","starred_url":"https://api.github.com/users/jaeandersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaeandersson/subscriptions","organizations_url":"https://api.github.com/users/jaeandersson/orgs","repos_url":"https://api.github.com/users/jaeandersson/repos","events_url":"https://api.github.com/users/jaeandersson/events{/privacy}","received_events_url":"https://api.github.com/users/jaeandersson/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T14:44:33Z","updated_at":"2016-01-22T14:44:33Z","body":"What you see is a function call to a function that depends only on x. The name of the function is \"if_else\"... If you want to see what is really being calculated, it's best to do C code generation."}}