{"action":"closed","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/3544","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/3544/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/3544/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/3544/events","html_url":"https://github.com/numpy/numpy/issues/3544","id":17091491,"number":3544,"title":"BUG: str and repr special methods blow up memory usage","user":{"login":"cpelley","id":2071643,"avatar_url":"https://avatars.githubusercontent.com/u/2071643?v=3","gravatar_id":"","url":"https://api.github.com/users/cpelley","html_url":"https://github.com/cpelley","followers_url":"https://api.github.com/users/cpelley/followers","following_url":"https://api.github.com/users/cpelley/following{/other_user}","gists_url":"https://api.github.com/users/cpelley/gists{/gist_id}","starred_url":"https://api.github.com/users/cpelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpelley/subscriptions","organizations_url":"https://api.github.com/users/cpelley/orgs","repos_url":"https://api.github.com/users/cpelley/repos","events_url":"https://api.github.com/users/cpelley/events{/privacy}","received_events_url":"https://api.github.com/users/cpelley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/numpy/numpy/labels/component:%20numpy.ma","name":"component: numpy.ma","color":"ff0000"},{"url":"https://api.github.com/repos/numpy/numpy/labels/Defect","name":"Defect","color":"444444"},{"url":"https://api.github.com/repos/numpy/numpy/labels/priority:%20normal","name":"priority: normal","color":"ff0000"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2013-07-23T09:26:52Z","updated_at":"2016-02-04T10:29:48Z","closed_at":"2016-02-04T10:29:48Z","body":"```Python\r\n>>> arr = np.zeros([43200, 21600], dtype=np.int8)\r\n>>> z = np.ma.masked_values(arr, 0)\r\n>>> print z\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/sci/lib/python2.7/site-packages/numpy/ma/core.py\", line 3530, in __str__\r\n    res = self._data.astype(\"|O8\")\r\nMemoryError\r\n```\r\n\r\nCalculated memory usage:\r\n(43200*21600.*8) + (43200*21600)\r\n8398080000.0 bits --> 0.9776651859283 GB"}}