{"action":"created","issue":{"url":"https://api.github.com/repos/cvxgrp/cvxpy/issues/229","labels_url":"https://api.github.com/repos/cvxgrp/cvxpy/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/cvxgrp/cvxpy/issues/229/comments","events_url":"https://api.github.com/repos/cvxgrp/cvxpy/issues/229/events","html_url":"https://github.com/cvxgrp/cvxpy/pull/229","id":108551851,"number":229,"title":"add logistic() atom","user":{"login":"mwytock","id":591830,"avatar_url":"https://avatars.githubusercontent.com/u/591830?v=3","gravatar_id":"","url":"https://api.github.com/users/mwytock","html_url":"https://github.com/mwytock","followers_url":"https://api.github.com/users/mwytock/followers","following_url":"https://api.github.com/users/mwytock/following{/other_user}","gists_url":"https://api.github.com/users/mwytock/gists{/gist_id}","starred_url":"https://api.github.com/users/mwytock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwytock/subscriptions","organizations_url":"https://api.github.com/users/mwytock/orgs","repos_url":"https://api.github.com/users/mwytock/repos","events_url":"https://api.github.com/users/mwytock/events{/privacy}","received_events_url":"https://api.github.com/users/mwytock/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-27T18:19:13Z","updated_at":"2015-09-30T04:47:09Z","closed_at":"2015-09-28T06:42:08Z","pull_request":{"url":"https://api.github.com/repos/cvxgrp/cvxpy/pulls/229","html_url":"https://github.com/cvxgrp/cvxpy/pull/229","diff_url":"https://github.com/cvxgrp/cvxpy/pull/229.diff","patch_url":"https://github.com/cvxgrp/cvxpy/pull/229.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/cvxgrp/cvxpy/issues/comments/144280520","html_url":"https://github.com/cvxgrp/cvxpy/pull/229#issuecomment-144280520","issue_url":"https://api.github.com/repos/cvxgrp/cvxpy/issues/229","id":144280520,"user":{"login":"mwytock","id":591830,"avatar_url":"https://avatars.githubusercontent.com/u/591830?v=3","gravatar_id":"","url":"https://api.github.com/users/mwytock","html_url":"https://github.com/mwytock","followers_url":"https://api.github.com/users/mwytock/followers","following_url":"https://api.github.com/users/mwytock/following{/other_user}","gists_url":"https://api.github.com/users/mwytock/gists{/gist_id}","starred_url":"https://api.github.com/users/mwytock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwytock/subscriptions","organizations_url":"https://api.github.com/users/mwytock/orgs","repos_url":"https://api.github.com/users/mwytock/repos","events_url":"https://api.github.com/users/mwytock/events{/privacy}","received_events_url":"https://api.github.com/users/mwytock/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T04:47:09Z","updated_at":"2015-09-30T04:47:09Z","body":"thanks, that makes sense\n\nOn Tue, Sep 29, 2015 at 9:51 PM, argriffing <notifications@github.com>\nwrote:\n\n>     @Elementwise.numpy_numeric\n>     def numeric(self, values):\n>         \"\"\"Evaluates e^x elementwise, adds 1, and takes the log.        \"\"\"\n>         return np.log(1 + np.exp(values[0]))\n>\n> Numerically this would be better as return np.logaddexp(0, values[0]).\n>\n> >>> x = np.array([-500, -10, 0, 10, 500, 2000000])>>> np.log(1 + np.exp(x))\n> __main__:1: RuntimeWarning: overflow encountered in exp\n> array([  0.00000000e+00,   4.53988992e-05,   6.93147181e-01,\n>          1.00000454e+01,   5.00000000e+02,              inf])>>> np.log1p(np.exp(x))\n> array([  7.12457641e-218,   4.53988992e-005,   6.93147181e-001,\n>          1.00000454e+001,   5.00000000e+002,               inf])>>> np.logaddexp(0, x)\n> array([  7.12457641e-218,   4.53988992e-005,   6.93147181e-001,\n>          1.00000454e+001,   5.00000000e+002,   2.00000000e+006])\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/cvxgrp/cvxpy/pull/229#issuecomment-144255443>.\n>\n"}}