{"action":"created","issue":{"url":"https://api.github.com/repos/gammapy/gammapy/issues/139","repository_url":"https://api.github.com/repos/gammapy/gammapy","labels_url":"https://api.github.com/repos/gammapy/gammapy/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/gammapy/gammapy/issues/139/comments","events_url":"https://api.github.com/repos/gammapy/gammapy/issues/139/events","html_url":"https://github.com/gammapy/gammapy/issues/139","id":37790470,"node_id":"MDU6SXNzdWUzNzc5MDQ3MA==","number":139,"title":"Numpy warning handling","user":{"login":"cdeil","id":852409,"node_id":"MDQ6VXNlcjg1MjQwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/852409?v=4","gravatar_id":"","url":"https://api.github.com/users/cdeil","html_url":"https://github.com/cdeil","followers_url":"https://api.github.com/users/cdeil/followers","following_url":"https://api.github.com/users/cdeil/following{/other_user}","gists_url":"https://api.github.com/users/cdeil/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeil/subscriptions","organizations_url":"https://api.github.com/users/cdeil/orgs","repos_url":"https://api.github.com/users/cdeil/repos","events_url":"https://api.github.com/users/cdeil/events{/privacy}","received_events_url":"https://api.github.com/users/cdeil/received_events","type":"User","site_admin":false},"labels":[{"id":52741016,"node_id":"MDU6TGFiZWw1Mjc0MTAxNg==","url":"https://api.github.com/repos/gammapy/gammapy/labels/cleanup","name":"cleanup","color":"5319e7","default":false},{"id":81703920,"node_id":"MDU6TGFiZWw4MTcwMzkyMA==","url":"https://api.github.com/repos/gammapy/gammapy/labels/docs","name":"docs","color":"0052cc","default":false},{"id":113697186,"node_id":"MDU6TGFiZWwxMTM2OTcxODY=","url":"https://api.github.com/repos/gammapy/gammapy/labels/effort-low","name":"effort-low","color":"fef2c0","default":false},{"id":113697435,"node_id":"MDU6TGFiZWwxMTM2OTc0MzU=","url":"https://api.github.com/repos/gammapy/gammapy/labels/package-intermediate","name":"package-intermediate","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":{"login":"adonath","id":3715928,"node_id":"MDQ6VXNlcjM3MTU5Mjg=","avatar_url":"https://avatars1.githubusercontent.com/u/3715928?v=4","gravatar_id":"","url":"https://api.github.com/users/adonath","html_url":"https://github.com/adonath","followers_url":"https://api.github.com/users/adonath/followers","following_url":"https://api.github.com/users/adonath/following{/other_user}","gists_url":"https://api.github.com/users/adonath/gists{/gist_id}","starred_url":"https://api.github.com/users/adonath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adonath/subscriptions","organizations_url":"https://api.github.com/users/adonath/orgs","repos_url":"https://api.github.com/users/adonath/repos","events_url":"https://api.github.com/users/adonath/events{/privacy}","received_events_url":"https://api.github.com/users/adonath/received_events","type":"User","site_admin":false},"assignees":[{"login":"adonath","id":3715928,"node_id":"MDQ6VXNlcjM3MTU5Mjg=","avatar_url":"https://avatars1.githubusercontent.com/u/3715928?v=4","gravatar_id":"","url":"https://api.github.com/users/adonath","html_url":"https://github.com/adonath","followers_url":"https://api.github.com/users/adonath/followers","following_url":"https://api.github.com/users/adonath/following{/other_user}","gists_url":"https://api.github.com/users/adonath/gists{/gist_id}","starred_url":"https://api.github.com/users/adonath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adonath/subscriptions","organizations_url":"https://api.github.com/users/adonath/orgs","repos_url":"https://api.github.com/users/adonath/repos","events_url":"https://api.github.com/users/adonath/events{/privacy}","received_events_url":"https://api.github.com/users/adonath/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/gammapy/gammapy/milestones/11","html_url":"https://github.com/gammapy/gammapy/milestone/11","labels_url":"https://api.github.com/repos/gammapy/gammapy/milestones/11/labels","id":2487784,"node_id":"MDk6TWlsZXN0b25lMjQ4Nzc4NA==","number":11,"title":"0.8","description":"","creator":{"login":"cdeil","id":852409,"node_id":"MDQ6VXNlcjg1MjQwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/852409?v=4","gravatar_id":"","url":"https://api.github.com/users/cdeil","html_url":"https://github.com/cdeil","followers_url":"https://api.github.com/users/cdeil/followers","following_url":"https://api.github.com/users/cdeil/following{/other_user}","gists_url":"https://api.github.com/users/cdeil/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeil/subscriptions","organizations_url":"https://api.github.com/users/cdeil/orgs","repos_url":"https://api.github.com/users/cdeil/repos","events_url":"https://api.github.com/users/cdeil/events{/privacy}","received_events_url":"https://api.github.com/users/cdeil/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":411,"state":"open","created_at":"2017-04-28T09:17:03Z","updated_at":"2018-08-15T23:09:24Z","due_on":"2018-08-15T07:00:00Z","closed_at":null},"comments":7,"created_at":"2014-07-14T14:21:28Z","updated_at":"2018-08-15T23:09:24Z","closed_at":null,"author_association":"MEMBER","body":"There's a bunch of cases in `gammapy` where `np.where` or `np.select` is used e.g. when evaluating `log` or `sqrt` or dividing.\n\nApparently some of those cases throw warnings that appear for the end-user and in the docs build:\n\n```\n<string>:26: RuntimeWarning: invalid value encountered in log                  \n/private/tmp/gammapy/build/lib.macosx-10.9-x86_64-2.7/gammapy/spectrum/powerlaw.py:65: RuntimeWarning: divide by zero encountered in true_divide\n  term1 = e / (-g + 1)\n/private/tmp/gammapy/build/lib.macosx-10.9-x86_64-2.7/gammapy/spectrum/powerlaw.py:67: RuntimeWarning: invalid value encountered in multiply\n  return term1 * term2\n/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/ma/core.py:6094: RuntimeWarning: overflow encountered in power\n  result = np.where(m, fa, umath.power(fa, fb)).view(basetype)\nNo labeled objects found. Use label='...' kwarg on individual plots.\n<string>:46: RuntimeWarning: divide by zero encountered in divide\n<string>:46: RuntimeWarning: divide by zero encountered in log10\n<string>:46: RuntimeWarning: invalid value encountered in log10\n```\n\nThe [`np.errstate`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.errstate.html) context manager should be used to avoid these warnings for the end-user (if the code can't be re-written in a better way.\n\ncc @adonath \n"},"comment":{"url":"https://api.github.com/repos/gammapy/gammapy/issues/comments/413367816","html_url":"https://github.com/gammapy/gammapy/issues/139#issuecomment-413367816","issue_url":"https://api.github.com/repos/gammapy/gammapy/issues/139","id":413367816,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzM2NzgxNg==","user":{"login":"cdeil","id":852409,"node_id":"MDQ6VXNlcjg1MjQwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/852409?v=4","gravatar_id":"","url":"https://api.github.com/users/cdeil","html_url":"https://github.com/cdeil","followers_url":"https://api.github.com/users/cdeil/followers","following_url":"https://api.github.com/users/cdeil/following{/other_user}","gists_url":"https://api.github.com/users/cdeil/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeil/subscriptions","organizations_url":"https://api.github.com/users/cdeil/orgs","repos_url":"https://api.github.com/users/cdeil/repos","events_url":"https://api.github.com/users/cdeil/events{/privacy}","received_events_url":"https://api.github.com/users/cdeil/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T23:09:24Z","updated_at":"2018-08-15T23:09:24Z","author_association":"MEMBER","body":"@adonath - There's still this FutureWarning from Numpy visible in the notebooks that you ran:\r\nhttps://gist.github.com/cdeil/b06ec84d5b5007cfe2284b6fdb6a219d#file-gistfile1-txt-L76\r\nIs it resolved or can you do it?"}}
{"actor":{"display_login":"cdeil"}}