{"action":"created","comment":{"url":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/comments/38294171","id":38294171,"diff_hunk":"@@ -237,11 +237,11 @@ def get_bounding_box(tree):\n     [xmax, ymax, zmax]]\n     \"\"\"\n \n-    min_x = min(p[0] for p in val_iter(tr.ipreorder(tree)))\n-    min_y = min(p[1] for p in val_iter(tr.ipreorder(tree)))\n-    min_z = min(p[2] for p in val_iter(tr.ipreorder(tree)))\n-    max_x = max(p[0] for p in val_iter(tr.ipreorder(tree)))\n-    max_y = max(p[1] for p in val_iter(tr.ipreorder(tree)))\n-    max_z = max(p[2] for p in val_iter(tr.ipreorder(tree)))\n+    min_x = min(p[COLS.X] for p in val_iter(tr.ipreorder(tree)))","path":"neurom/analysis/morphtree.py","position":10,"original_position":10,"commit_id":"f04a801d85a6dae738da1969a9bcba1650039284","original_commit_id":"f04a801d85a6dae738da1969a9bcba1650039284","user":{"login":"mgeplf","id":13150119,"avatar_url":"https://avatars.githubusercontent.com/u/13150119?v=3","gravatar_id":"","url":"https://api.github.com/users/mgeplf","html_url":"https://github.com/mgeplf","followers_url":"https://api.github.com/users/mgeplf/followers","following_url":"https://api.github.com/users/mgeplf/following{/other_user}","gists_url":"https://api.github.com/users/mgeplf/gists{/gist_id}","starred_url":"https://api.github.com/users/mgeplf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgeplf/subscriptions","organizations_url":"https://api.github.com/users/mgeplf/orgs","repos_url":"https://api.github.com/users/mgeplf/repos","events_url":"https://api.github.com/users/mgeplf/events{/privacy}","received_events_url":"https://api.github.com/users/mgeplf/received_events","type":"User","site_admin":false},"body":"This seems inefficient, couldn't you do something like:\r\nmin_value, max_value = np.array([np.INF, np.INF, np.INF), np.array([np.NINF, np.NINF, np.NINF)\r\nfor p in val_iter(tr.ipreorder(tree)):\r\n    min_value = np.minimum(p, min_value)\r\n    max_value = np.maximum(p, max_value)\r\nreturn min_value, max_value\r\n\r\nThat what it's one traversal instead of 6","created_at":"2015-08-31T08:47:45Z","updated_at":"2015-08-31T08:47:45Z","html_url":"https://github.com/BlueBrain/NeuroM/pull/31#discussion_r38294171","pull_request_url":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/comments/38294171"},"html":{"href":"https://github.com/BlueBrain/NeuroM/pull/31#discussion_r38294171"},"pull_request":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/31","id":43633666,"html_url":"https://github.com/BlueBrain/NeuroM/pull/31","diff_url":"https://github.com/BlueBrain/NeuroM/pull/31.diff","patch_url":"https://github.com/BlueBrain/NeuroM/pull/31.patch","issue_url":"https://api.github.com/repos/BlueBrain/NeuroM/issues/31","number":31,"state":"open","locked":false,"title":"Add neuron bounding box function.","user":{"login":"juanchopanza","id":675013,"avatar_url":"https://avatars.githubusercontent.com/u/675013?v=3","gravatar_id":"","url":"https://api.github.com/users/juanchopanza","html_url":"https://github.com/juanchopanza","followers_url":"https://api.github.com/users/juanchopanza/followers","following_url":"https://api.github.com/users/juanchopanza/following{/other_user}","gists_url":"https://api.github.com/users/juanchopanza/gists{/gist_id}","starred_url":"https://api.github.com/users/juanchopanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanchopanza/subscriptions","organizations_url":"https://api.github.com/users/juanchopanza/orgs","repos_url":"https://api.github.com/users/juanchopanza/repos","events_url":"https://api.github.com/users/juanchopanza/events{/privacy}","received_events_url":"https://api.github.com/users/juanchopanza/received_events","type":"User","site_admin":false},"body":"Implemented in neurom.core.neuron.\r\nImported into neurom.ezy.","created_at":"2015-08-28T14:29:37Z","updated_at":"2015-08-31T08:47:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"324fde726fb3b63af851b20d0d351161612d2292","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/31/commits","review_comments_url":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/31/comments","review_comment_url":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BlueBrain/NeuroM/issues/31/comments","statuses_url":"https://api.github.com/repos/BlueBrain/NeuroM/statuses/f04a801d85a6dae738da1969a9bcba1650039284","head":{"label":"juanchopanza:master","ref":"master","sha":"f04a801d85a6dae738da1969a9bcba1650039284","user":{"login":"juanchopanza","id":675013,"avatar_url":"https://avatars.githubusercontent.com/u/675013?v=3","gravatar_id":"","url":"https://api.github.com/users/juanchopanza","html_url":"https://github.com/juanchopanza","followers_url":"https://api.github.com/users/juanchopanza/followers","following_url":"https://api.github.com/users/juanchopanza/following{/other_user}","gists_url":"https://api.github.com/users/juanchopanza/gists{/gist_id}","starred_url":"https://api.github.com/users/juanchopanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanchopanza/subscriptions","organizations_url":"https://api.github.com/users/juanchopanza/orgs","repos_url":"https://api.github.com/users/juanchopanza/repos","events_url":"https://api.github.com/users/juanchopanza/events{/privacy}","received_events_url":"https://api.github.com/users/juanchopanza/received_events","type":"User","site_admin":false},"repo":{"id":40894014,"name":"NeuroM","full_name":"juanchopanza/NeuroM","owner":{"login":"juanchopanza","id":675013,"avatar_url":"https://avatars.githubusercontent.com/u/675013?v=3","gravatar_id":"","url":"https://api.github.com/users/juanchopanza","html_url":"https://github.com/juanchopanza","followers_url":"https://api.github.com/users/juanchopanza/followers","following_url":"https://api.github.com/users/juanchopanza/following{/other_user}","gists_url":"https://api.github.com/users/juanchopanza/gists{/gist_id}","starred_url":"https://api.github.com/users/juanchopanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanchopanza/subscriptions","organizations_url":"https://api.github.com/users/juanchopanza/orgs","repos_url":"https://api.github.com/users/juanchopanza/repos","events_url":"https://api.github.com/users/juanchopanza/events{/privacy}","received_events_url":"https://api.github.com/users/juanchopanza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juanchopanza/NeuroM","description":"Neuronal Morphology Viewing and Analysis Tool","fork":true,"url":"https://api.github.com/repos/juanchopanza/NeuroM","forks_url":"https://api.github.com/repos/juanchopanza/NeuroM/forks","keys_url":"https://api.github.com/repos/juanchopanza/NeuroM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juanchopanza/NeuroM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juanchopanza/NeuroM/teams","hooks_url":"https://api.github.com/repos/juanchopanza/NeuroM/hooks","issue_events_url":"https://api.github.com/repos/juanchopanza/NeuroM/issues/events{/number}","events_url":"https://api.github.com/repos/juanchopanza/NeuroM/events","assignees_url":"https://api.github.com/repos/juanchopanza/NeuroM/assignees{/user}","branches_url":"https://api.github.com/repos/juanchopanza/NeuroM/branches{/branch}","tags_url":"https://api.github.com/repos/juanchopanza/NeuroM/tags","blobs_url":"https://api.github.com/repos/juanchopanza/NeuroM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juanchopanza/NeuroM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juanchopanza/NeuroM/git/refs{/sha}","trees_url":"https://api.github.com/repos/juanchopanza/NeuroM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juanchopanza/NeuroM/statuses/{sha}","languages_url":"https://api.github.com/repos/juanchopanza/NeuroM/languages","stargazers_url":"https://api.github.com/repos/juanchopanza/NeuroM/stargazers","contributors_url":"https://api.github.com/repos/juanchopanza/NeuroM/contributors","subscribers_url":"https://api.github.com/repos/juanchopanza/NeuroM/subscribers","subscription_url":"https://api.github.com/repos/juanchopanza/NeuroM/subscription","commits_url":"https://api.github.com/repos/juanchopanza/NeuroM/commits{/sha}","git_commits_url":"https://api.github.com/repos/juanchopanza/NeuroM/git/commits{/sha}","comments_url":"https://api.github.com/repos/juanchopanza/NeuroM/comments{/number}","issue_comment_url":"https://api.github.com/repos/juanchopanza/NeuroM/issues/comments{/number}","contents_url":"https://api.github.com/repos/juanchopanza/NeuroM/contents/{+path}","compare_url":"https://api.github.com/repos/juanchopanza/NeuroM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juanchopanza/NeuroM/merges","archive_url":"https://api.github.com/repos/juanchopanza/NeuroM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juanchopanza/NeuroM/downloads","issues_url":"https://api.github.com/repos/juanchopanza/NeuroM/issues{/number}","pulls_url":"https://api.github.com/repos/juanchopanza/NeuroM/pulls{/number}","milestones_url":"https://api.github.com/repos/juanchopanza/NeuroM/milestones{/number}","notifications_url":"https://api.github.com/repos/juanchopanza/NeuroM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juanchopanza/NeuroM/labels{/name}","releases_url":"https://api.github.com/repos/juanchopanza/NeuroM/releases{/id}","created_at":"2015-08-17T12:45:31Z","updated_at":"2015-08-24T18:32:43Z","pushed_at":"2015-08-28T14:27:38Z","git_url":"git://github.com/juanchopanza/NeuroM.git","ssh_url":"git@github.com:juanchopanza/NeuroM.git","clone_url":"https://github.com/juanchopanza/NeuroM.git","svn_url":"https://github.com/juanchopanza/NeuroM","homepage":null,"size":2141,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"BlueBrain:master","ref":"master","sha":"e114783096422cf6785d74f08e8725a84e4ffd42","user":{"login":"BlueBrain","id":1479142,"avatar_url":"https://avatars.githubusercontent.com/u/1479142?v=3","gravatar_id":"","url":"https://api.github.com/users/BlueBrain","html_url":"https://github.com/BlueBrain","followers_url":"https://api.github.com/users/BlueBrain/followers","following_url":"https://api.github.com/users/BlueBrain/following{/other_user}","gists_url":"https://api.github.com/users/BlueBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/BlueBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlueBrain/subscriptions","organizations_url":"https://api.github.com/users/BlueBrain/orgs","repos_url":"https://api.github.com/users/BlueBrain/repos","events_url":"https://api.github.com/users/BlueBrain/events{/privacy}","received_events_url":"https://api.github.com/users/BlueBrain/received_events","type":"Organization","site_admin":false},"repo":{"id":34906350,"name":"NeuroM","full_name":"BlueBrain/NeuroM","owner":{"login":"BlueBrain","id":1479142,"avatar_url":"https://avatars.githubusercontent.com/u/1479142?v=3","gravatar_id":"","url":"https://api.github.com/users/BlueBrain","html_url":"https://github.com/BlueBrain","followers_url":"https://api.github.com/users/BlueBrain/followers","following_url":"https://api.github.com/users/BlueBrain/following{/other_user}","gists_url":"https://api.github.com/users/BlueBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/BlueBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlueBrain/subscriptions","organizations_url":"https://api.github.com/users/BlueBrain/orgs","repos_url":"https://api.github.com/users/BlueBrain/repos","events_url":"https://api.github.com/users/BlueBrain/events{/privacy}","received_events_url":"https://api.github.com/users/BlueBrain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BlueBrain/NeuroM","description":"Neuronal Morphology Viewing and Analysis Tool","fork":false,"url":"https://api.github.com/repos/BlueBrain/NeuroM","forks_url":"https://api.github.com/repos/BlueBrain/NeuroM/forks","keys_url":"https://api.github.com/repos/BlueBrain/NeuroM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BlueBrain/NeuroM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BlueBrain/NeuroM/teams","hooks_url":"https://api.github.com/repos/BlueBrain/NeuroM/hooks","issue_events_url":"https://api.github.com/repos/BlueBrain/NeuroM/issues/events{/number}","events_url":"https://api.github.com/repos/BlueBrain/NeuroM/events","assignees_url":"https://api.github.com/repos/BlueBrain/NeuroM/assignees{/user}","branches_url":"https://api.github.com/repos/BlueBrain/NeuroM/branches{/branch}","tags_url":"https://api.github.com/repos/BlueBrain/NeuroM/tags","blobs_url":"https://api.github.com/repos/BlueBrain/NeuroM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BlueBrain/NeuroM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BlueBrain/NeuroM/git/refs{/sha}","trees_url":"https://api.github.com/repos/BlueBrain/NeuroM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BlueBrain/NeuroM/statuses/{sha}","languages_url":"https://api.github.com/repos/BlueBrain/NeuroM/languages","stargazers_url":"https://api.github.com/repos/BlueBrain/NeuroM/stargazers","contributors_url":"https://api.github.com/repos/BlueBrain/NeuroM/contributors","subscribers_url":"https://api.github.com/repos/BlueBrain/NeuroM/subscribers","subscription_url":"https://api.github.com/repos/BlueBrain/NeuroM/subscription","commits_url":"https://api.github.com/repos/BlueBrain/NeuroM/commits{/sha}","git_commits_url":"https://api.github.com/repos/BlueBrain/NeuroM/git/commits{/sha}","comments_url":"https://api.github.com/repos/BlueBrain/NeuroM/comments{/number}","issue_comment_url":"https://api.github.com/repos/BlueBrain/NeuroM/issues/comments{/number}","contents_url":"https://api.github.com/repos/BlueBrain/NeuroM/contents/{+path}","compare_url":"https://api.github.com/repos/BlueBrain/NeuroM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BlueBrain/NeuroM/merges","archive_url":"https://api.github.com/repos/BlueBrain/NeuroM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BlueBrain/NeuroM/downloads","issues_url":"https://api.github.com/repos/BlueBrain/NeuroM/issues{/number}","pulls_url":"https://api.github.com/repos/BlueBrain/NeuroM/pulls{/number}","milestones_url":"https://api.github.com/repos/BlueBrain/NeuroM/milestones{/number}","notifications_url":"https://api.github.com/repos/BlueBrain/NeuroM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BlueBrain/NeuroM/labels{/name}","releases_url":"https://api.github.com/repos/BlueBrain/NeuroM/releases{/id}","created_at":"2015-05-01T14:21:43Z","updated_at":"2015-08-28T11:49:11Z","pushed_at":"2015-08-28T14:29:37Z","git_url":"git://github.com/BlueBrain/NeuroM.git","ssh_url":"git@github.com:BlueBrain/NeuroM.git","clone_url":"https://github.com/BlueBrain/NeuroM.git","svn_url":"https://github.com/BlueBrain/NeuroM","homepage":null,"size":2376,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/31"},"html":{"href":"https://github.com/BlueBrain/NeuroM/pull/31"},"issue":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/issues/31"},"comments":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/BlueBrain/NeuroM/statuses/f04a801d85a6dae738da1969a9bcba1650039284"}}}}