{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/5986","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/5986/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/5986/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/5986/events","html_url":"https://github.com/scipy/scipy/issues/5986","id":142101132,"number":5986,"title":"memory usage after running scipy.signal.fftconvolve (possible memory leak?)","user":{"login":"johnpeeb","id":9771670,"avatar_url":"https://avatars.githubusercontent.com/u/9771670?v=3","gravatar_id":"","url":"https://api.github.com/users/johnpeeb","html_url":"https://github.com/johnpeeb","followers_url":"https://api.github.com/users/johnpeeb/followers","following_url":"https://api.github.com/users/johnpeeb/following{/other_user}","gists_url":"https://api.github.com/users/johnpeeb/gists{/gist_id}","starred_url":"https://api.github.com/users/johnpeeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnpeeb/subscriptions","organizations_url":"https://api.github.com/users/johnpeeb/orgs","repos_url":"https://api.github.com/users/johnpeeb/repos","events_url":"https://api.github.com/users/johnpeeb/events{/privacy}","received_events_url":"https://api.github.com/users/johnpeeb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scipy/scipy/labels/query","name":"query","color":"d4c5f9"},{"url":"https://api.github.com/repos/scipy/scipy/labels/scipy.fftpack","name":"scipy.fftpack","color":"207de5"},{"url":"https://api.github.com/repos/scipy/scipy/labels/scipy.signal","name":"scipy.signal","color":"207de5"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-03-19T21:11:58Z","updated_at":"2016-10-25T13:58:31Z","closed_at":null,"body":"Consider the memory usage of the following code after executing each statement:\r\n\r\n    import numpy\r\n    import scipy.signal\r\n    import gc\r\n    \r\n    # memory at this point is ~35mb\r\n          \r\n    a = numpy.ones(10**7)\r\n    b = numpy.ones(10**7)\r\n    \r\n    # memory at this point is ~187mb\r\n    \r\n    c = scipy.signal.fftconvolve(a, numpy.flipud(b), mode=\"full\")\r\n    \r\n    # memory usage at this point is 645mb\r\n    # given that a,b,c take up about 305mb in total, this is much\r\n    # larger than expected\r\n    \r\n    # If we delete a,b,c and garbage collect...\r\n    \r\n    del a,b,c\r\n    gc.collect()\r\n    \r\n    # ...the memory usage drops to ~340mb which is a drop of 305mb\r\n    # (as expected since that is the size of what we deleted)\r\n    # but the remaining memory usage is still 340mb\r\n    # which is much larger than the starting value of 35 mb\r\n\r\nIs this extra several hundred mb of memory usage a bug?\r\n\r\nPlatform:\r\n\r\n - CPython 3.5.1 x64\r\n - Scipy 0.17.0 (Christoph Golke's package)\r\n - Numpy+MKL 1.11.0rc1 (Cristoph Golke's package)\r\n - Windows 8.1 x64\r\n"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/256042289","html_url":"https://github.com/scipy/scipy/issues/5986#issuecomment-256042289","issue_url":"https://api.github.com/repos/scipy/scipy/issues/5986","id":256042289,"user":{"login":"person142","id":15134881,"avatar_url":"https://avatars.githubusercontent.com/u/15134881?v=3","gravatar_id":"","url":"https://api.github.com/users/person142","html_url":"https://github.com/person142","followers_url":"https://api.github.com/users/person142/followers","following_url":"https://api.github.com/users/person142/following{/other_user}","gists_url":"https://api.github.com/users/person142/gists{/gist_id}","starred_url":"https://api.github.com/users/person142/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/person142/subscriptions","organizations_url":"https://api.github.com/users/person142/orgs","repos_url":"https://api.github.com/users/person142/repos","events_url":"https://api.github.com/users/person142/events{/privacy}","received_events_url":"https://api.github.com/users/person142/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T13:58:31Z","updated_at":"2016-10-25T13:58:31Z","body":"Hm, that is probably also the explanation for https://github.com/scipy/scipy/issues/1879."}}
{"actor":{"display_login":"person142"}}