{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4787","repository_url":"https://api.github.com/repos/astropy/astropy","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4787/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4787/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4787/events","html_url":"https://github.com/astropy/astropy/pull/4787","id":149260192,"number":4787,"title":"added __repr__ to NDUncertainty.","user":{"login":"MSeifert04","id":14200878,"avatar_url":"https://avatars.githubusercontent.com/u/14200878?v=3","gravatar_id":"","url":"https://api.github.com/users/MSeifert04","html_url":"https://github.com/MSeifert04","followers_url":"https://api.github.com/users/MSeifert04/followers","following_url":"https://api.github.com/users/MSeifert04/following{/other_user}","gists_url":"https://api.github.com/users/MSeifert04/gists{/gist_id}","starred_url":"https://api.github.com/users/MSeifert04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSeifert04/subscriptions","organizations_url":"https://api.github.com/users/MSeifert04/orgs","repos_url":"https://api.github.com/users/MSeifert04/repos","events_url":"https://api.github.com/users/MSeifert04/events{/privacy}","received_events_url":"https://api.github.com/users/MSeifert04/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-18T20:19:58Z","updated_at":"2016-04-18T21:59:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/4787","html_url":"https://github.com/astropy/astropy/pull/4787","diff_url":"https://github.com/astropy/astropy/pull/4787.diff","patch_url":"https://github.com/astropy/astropy/pull/4787.patch"},"body":"I think ``NDUncertainty`` (and subclasses) should have a basic `__repr__` method instead of displaying the Memory-Adress.\r\n\r\nI'm not sure if the unit should be displayed. If it's unnecessary I can delete it again.\r\n\r\nExample:\r\n```\r\n>>> ndd = NDData(np.array([[1,2,3],[2,3,4]]), unit='m')\r\n>>> ndd.uncertainty = StdDevUncertainty(np.ones((10,10)))\r\n>>> ndd.uncertainty\r\nStdDevUncertainty([[ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                   [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.]], unit: m)\r\n\r\n>>> ndd = NDData(np.array([[1,2,3],[2,3,4]])) # no specified unit\r\n>>> ndd.uncertainty = np.ones((10,10))\r\nINFO: Uncertainty should have attribute uncertainty_type. [astropy.nddata.nddata]\r\n>>> ndd.uncertainty\r\nUnknownUncertainty([[ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.],\r\n                    [ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.]])\r\n```"},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/211599021","html_url":"https://github.com/astropy/astropy/pull/4787#issuecomment-211599021","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4787","id":211599021,"user":{"login":"MSeifert04","id":14200878,"avatar_url":"https://avatars.githubusercontent.com/u/14200878?v=3","gravatar_id":"","url":"https://api.github.com/users/MSeifert04","html_url":"https://github.com/MSeifert04","followers_url":"https://api.github.com/users/MSeifert04/followers","following_url":"https://api.github.com/users/MSeifert04/following{/other_user}","gists_url":"https://api.github.com/users/MSeifert04/gists{/gist_id}","starred_url":"https://api.github.com/users/MSeifert04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSeifert04/subscriptions","organizations_url":"https://api.github.com/users/MSeifert04/orgs","repos_url":"https://api.github.com/users/MSeifert04/repos","events_url":"https://api.github.com/users/MSeifert04/events{/privacy}","received_events_url":"https://api.github.com/users/MSeifert04/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T21:59:14Z","updated_at":"2016-04-18T21:59:14Z","body":"I think the test failure is unrelated to this PR."}}