{"action":"created","issue":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/2367","labels_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/2367/labels{/name}","comments_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/2367/comments","events_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/2367/events","html_url":"https://github.com/statsmodels/statsmodels/issues/2367","id":69836148,"number":2367,"title":"Design: flexible number of returns","user":{"login":"josef-pkt","id":440735,"avatar_url":"https://avatars.githubusercontent.com/u/440735?v=3","gravatar_id":"","url":"https://api.github.com/users/josef-pkt","html_url":"https://github.com/josef-pkt","followers_url":"https://api.github.com/users/josef-pkt/followers","following_url":"https://api.github.com/users/josef-pkt/following{/other_user}","gists_url":"https://api.github.com/users/josef-pkt/gists{/gist_id}","starred_url":"https://api.github.com/users/josef-pkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josef-pkt/subscriptions","organizations_url":"https://api.github.com/users/josef-pkt/orgs","repos_url":"https://api.github.com/users/josef-pkt/repos","events_url":"https://api.github.com/users/josef-pkt/events{/privacy}","received_events_url":"https://api.github.com/users/josef-pkt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/statsmodels/statsmodels/labels/comp-base","name":"comp-base","color":"ededed"},{"url":"https://api.github.com/repos/statsmodels/statsmodels/labels/design","name":"design","color":"99ffcc"},{"url":"https://api.github.com/repos/statsmodels/statsmodels/labels/type-refactor","name":"type-refactor","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-21T12:42:39Z","updated_at":"2015-04-21T22:47:54Z","closed_at":null,"body":"What are the functions that have a variable number of returns based on the keyword arguments?\r\n\r\nacf return see #2366\r\n\r\n\r\n**design options**\r\n\r\n- keep variable number of returns\r\n- always return Bunch or Results if we need variable number of returns (current trend in pattern for many functions/methods that need more flexibility and can have lazily evaluated extra results)\r\n- fill returns with `None`, so the number of returns remains unchanged (proposed in #2366 )\r\n\r\nAny changes in number and types of returns will break backwards compatibility, and we should settle on a pattern so we have to break it only once"},"comment":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/comments/94965334","html_url":"https://github.com/statsmodels/statsmodels/issues/2367#issuecomment-94965334","issue_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/2367","id":94965334,"user":{"login":"kshedden","id":2666691,"avatar_url":"https://avatars.githubusercontent.com/u/2666691?v=3","gravatar_id":"","url":"https://api.github.com/users/kshedden","html_url":"https://github.com/kshedden","followers_url":"https://api.github.com/users/kshedden/followers","following_url":"https://api.github.com/users/kshedden/following{/other_user}","gists_url":"https://api.github.com/users/kshedden/gists{/gist_id}","starred_url":"https://api.github.com/users/kshedden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshedden/subscriptions","organizations_url":"https://api.github.com/users/kshedden/orgs","repos_url":"https://api.github.com/users/kshedden/repos","events_url":"https://api.github.com/users/kshedden/events{/privacy}","received_events_url":"https://api.github.com/users/kshedden/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T22:47:54Z","updated_at":"2015-04-21T22:47:54Z","body":"For more complex generic functions like predict I prefer the bunch option, with unfilled slots as appropriate.\r\n\r\nI did this for predict in PHReg without thinking of the implications.  I wanted to return the predicted log hazard, cumulative hazard, standard errors, etc.\r\n\r\nThen I tried to use this with new generic procedures like MICE and Mediation and ran into trouble because predict usually just returns the fitted values.  So I had to (temporarily) special case PHReg, or leave it broken.\r\n"}}