{"action":"closed","issue":{"url":"https://api.github.com/repos/pympler/pympler/issues/36","repository_url":"https://api.github.com/repos/pympler/pympler","labels_url":"https://api.github.com/repos/pympler/pympler/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/pympler/pympler/issues/36/comments","events_url":"https://api.github.com/repos/pympler/pympler/issues/36/events","html_url":"https://github.com/pympler/pympler/issues/36","id":150963749,"number":36,"title":"asizeof does not properly size numpy arrays","user":{"login":"Paul-E","id":4206484,"avatar_url":"https://avatars.githubusercontent.com/u/4206484?v=3","gravatar_id":"","url":"https://api.github.com/users/Paul-E","html_url":"https://github.com/Paul-E","followers_url":"https://api.github.com/users/Paul-E/followers","following_url":"https://api.github.com/users/Paul-E/following{/other_user}","gists_url":"https://api.github.com/users/Paul-E/gists{/gist_id}","starred_url":"https://api.github.com/users/Paul-E/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Paul-E/subscriptions","organizations_url":"https://api.github.com/users/Paul-E/orgs","repos_url":"https://api.github.com/users/Paul-E/repos","events_url":"https://api.github.com/users/Paul-E/events{/privacy}","received_events_url":"https://api.github.com/users/Paul-E/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-04-25T19:51:21Z","updated_at":"2016-10-03T15:22:51Z","closed_at":"2016-10-03T15:22:51Z","body":"Although numpy is not a part of the python standard library, it is a part of many python developer's standard toolkits. Therefore it seems like it would be useful to properly size numpy arrays. Currently asizeof does not properly size numpy arrays. eg:\r\n\r\n```\r\n>>> import numpy as np\r\n>>> from pympler import asizeof\r\n>>> example = np.arange(1000)\r\n>>> asizeof.asizeof(example)\r\n80\r\n```\r\nClearly, an array of 1000 values should take more than 80 bytes of memory.\r\nFortunately numpy arrays have an \"nbytes\" property that indicates their size, thus\r\n\r\n```\r\n>>> example.nbytes\r\n8000\r\n```\r\nIt may be possible to get an accurate idea of numpy array memory usage using this property.\r\n\r\nI ran these commands in Python 3.4 with pympler 0.4.3"}}
{"actor":{"display_login":"Paul-E"}}