{"action":"created","issue":{"url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation/issues/324","repository_url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation","labels_url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation/issues/324/comments","events_url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation/issues/324/events","html_url":"https://github.com/swcarpentry/python-novice-inflammation/pull/324","id":183519244,"number":324,"title":"Adds solution to challenge `Stacking Arrays` in episode one","user":{"login":"itcarroll","id":3383837,"avatar_url":"https://avatars.githubusercontent.com/u/3383837?v=3","gravatar_id":"","url":"https://api.github.com/users/itcarroll","html_url":"https://github.com/itcarroll","followers_url":"https://api.github.com/users/itcarroll/followers","following_url":"https://api.github.com/users/itcarroll/following{/other_user}","gists_url":"https://api.github.com/users/itcarroll/gists{/gist_id}","starred_url":"https://api.github.com/users/itcarroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itcarroll/subscriptions","organizations_url":"https://api.github.com/users/itcarroll/orgs","repos_url":"https://api.github.com/users/itcarroll/repos","events_url":"https://api.github.com/users/itcarroll/events{/privacy}","received_events_url":"https://api.github.com/users/itcarroll/received_events","type":"User","site_admin":false},"labels":[{"id":306786973,"url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation/labels/instructor-training","name":"instructor-training","color":"6e5494","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-17T20:30:24Z","updated_at":"2016-11-08T00:12:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation/pulls/324","html_url":"https://github.com/swcarpentry/python-novice-inflammation/pull/324","diff_url":"https://github.com/swcarpentry/python-novice-inflammation/pull/324.diff","patch_url":"https://github.com/swcarpentry/python-novice-inflammation/pull/324.patch"},"body":"This is my first PR for a Software Carpentry lesson, so please don't hesitate to correct my procedure.\n\nThe way I interpreted the challenge, it is necessary for the trainee to avoid removal of singleton dimensions that can result from indexing. I don't think the solution gets ahead of future lessons, but perhaps an maintainer could say?\n"},"comment":{"url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation/issues/comments/259005508","html_url":"https://github.com/swcarpentry/python-novice-inflammation/pull/324#issuecomment-259005508","issue_url":"https://api.github.com/repos/swcarpentry/python-novice-inflammation/issues/324","id":259005508,"user":{"login":"valentina-s","id":11621647,"avatar_url":"https://avatars.githubusercontent.com/u/11621647?v=3","gravatar_id":"","url":"https://api.github.com/users/valentina-s","html_url":"https://github.com/valentina-s","followers_url":"https://api.github.com/users/valentina-s/followers","following_url":"https://api.github.com/users/valentina-s/following{/other_user}","gists_url":"https://api.github.com/users/valentina-s/gists{/gist_id}","starred_url":"https://api.github.com/users/valentina-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valentina-s/subscriptions","organizations_url":"https://api.github.com/users/valentina-s/orgs","repos_url":"https://api.github.com/users/valentina-s/repos","events_url":"https://api.github.com/users/valentina-s/events{/privacy}","received_events_url":"https://api.github.com/users/valentina-s/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T00:12:43Z","updated_at":"2016-11-08T00:12:43Z","body":"Thank you for the contribution! \r\nYour solution is ok (I suspect the array indexing would look a bit like a magic to a novice, but I do not see much better alternative). Another option is to explain that the stacking functions treat the one dimensional arrays as row vectors, so to obtain the desired result we need \r\n\r\n`numpy.vstack([A[:,0],A[:,-1]]).T`\r\n\r\nUnfortunately, I realized transposing has not been introduced in this part yet, so it would require a brief explanation. So if you wish you can add it as an alternative. \r\n\r\n"}}
{"actor":{"display_login":"valentina-s"}}