{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/11615","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/11615/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/11615/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/11615/events","html_url":"https://github.com/scikit-learn/scikit-learn/issues/11615","id":342125338,"node_id":"MDU6SXNzdWUzNDIxMjUzMzg=","number":11615,"title":"MAINT Use np.full instead of np.ones when applicable","user":{"login":"rth","id":630936,"node_id":"MDQ6VXNlcjYzMDkzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/630936?v=4","gravatar_id":"","url":"https://api.github.com/users/rth","html_url":"https://github.com/rth","followers_url":"https://api.github.com/users/rth/followers","following_url":"https://api.github.com/users/rth/following{/other_user}","gists_url":"https://api.github.com/users/rth/gists{/gist_id}","starred_url":"https://api.github.com/users/rth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rth/subscriptions","organizations_url":"https://api.github.com/users/rth/orgs","repos_url":"https://api.github.com/users/rth/repos","events_url":"https://api.github.com/users/rth/events{/privacy}","received_events_url":"https://api.github.com/users/rth/received_events","type":"User","site_admin":false},"labels":[{"id":12995769,"node_id":"MDU6TGFiZWwxMjk5NTc2OQ==","url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels/Easy","name":"Easy","color":"02d7e1","default":false},{"id":723599497,"node_id":"MDU6TGFiZWw3MjM1OTk0OTc=","url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels/help%20wanted","name":"help wanted","color":"33aa3f","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-17T23:36:00Z","updated_at":"2018-07-19T06:57:38Z","closed_at":null,"author_association":"MEMBER","body":"`numpy.full(shape, value)` is a more efficient way of creating arrays with constant value than `np.ones(shape)*value` as it saves one memory allocation, as suggested by @GaelVaroquaux \r\n\r\nIt is included since numpy 1.8 I think.\r\n\r\nIt could be worth replacing the occurrences of `np.ones` with `np.full` in the code-base when that is applicable."},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/406174639","html_url":"https://github.com/scikit-learn/scikit-learn/issues/11615#issuecomment-406174639","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/11615","id":406174639,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjE3NDYzOQ==","user":{"login":"rth","id":630936,"node_id":"MDQ6VXNlcjYzMDkzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/630936?v=4","gravatar_id":"","url":"https://api.github.com/users/rth","html_url":"https://github.com/rth","followers_url":"https://api.github.com/users/rth/followers","following_url":"https://api.github.com/users/rth/following{/other_user}","gists_url":"https://api.github.com/users/rth/gists{/gist_id}","starred_url":"https://api.github.com/users/rth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rth/subscriptions","organizations_url":"https://api.github.com/users/rth/orgs","repos_url":"https://api.github.com/users/rth/repos","events_url":"https://api.github.com/users/rth/events{/privacy}","received_events_url":"https://api.github.com/users/rth/received_events","type":"User","site_admin":false},"created_at":"2018-07-19T06:57:38Z","updated_at":"2018-07-19T06:57:38Z","author_association":"MEMBER","body":"This issue is already being worked on by @zjpoh . There are a number of other issues with the \"help wanted\" or \"good first issue\" tags though."}}
{"actor":{"display_login":"rth"}}