{"action":"created","comment":{"url":"https://api.github.com/repos/pfnet/chainer/pulls/comments/112928693","pull_request_review_id":34278000,"id":112928693,"diff_hunk":"@@ -52,10 +52,11 @@ def vstack(xs):\n         xs (list of :class:`~chainer.Variable` or :class:`numpy.ndarray` or \\\n         :class:`cupy.ndarray`):\n             Input variables to be concatenated. The variables must have the\n-            same ``ndim``. Also, when the variables have vertical dimension\n-            (i.e. :math:`ndim \\\\geq 1`), the variables must have the same\n-            shape, except in the vertical (row wise) dimension.\n-\n+            same ``ndim``. When the variables have the second axis (i.e.","path":"chainer/functions/array/vstack.py","position":null,"original_position":8,"commit_id":"e22a344822e0b65bab8b57f9a091befd30c32aa3","original_commit_id":"e22a344822e0b65bab8b57f9a091befd30c32aa3","user":{"login":"keisuke-umezawa","id":1277089,"avatar_url":"https://avatars1.githubusercontent.com/u/1277089?v=3","gravatar_id":"","url":"https://api.github.com/users/keisuke-umezawa","html_url":"https://github.com/keisuke-umezawa","followers_url":"https://api.github.com/users/keisuke-umezawa/followers","following_url":"https://api.github.com/users/keisuke-umezawa/following{/other_user}","gists_url":"https://api.github.com/users/keisuke-umezawa/gists{/gist_id}","starred_url":"https://api.github.com/users/keisuke-umezawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keisuke-umezawa/subscriptions","organizations_url":"https://api.github.com/users/keisuke-umezawa/orgs","repos_url":"https://api.github.com/users/keisuke-umezawa/repos","events_url":"https://api.github.com/users/keisuke-umezawa/events{/privacy}","received_events_url":"https://api.github.com/users/keisuke-umezawa/received_events","type":"User","site_admin":false},"body":"When concatenating the 1dim array, the variables must have the same shape along all ~~but the first axis~~... Are there my misunderstanding?\r\n\r\n```\r\n>>> import numpy as np\r\n>>> import chainer.functions as F\r\n>>> x1 = np.arange(0, 12)\r\n>>> x2 = np.arange(0, 12)\r\n>>> F.vstack([x1, x2]).data\r\narray([[ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11],\r\n          [ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11]])\r\n>>> x2 = np.arange(0, 11)\r\n>>> F.vstack([x1, x2]).data\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/kumezawa/dev/chainer/chainer/functions/array/vstack.py\", line 59, in vstack\r\n    return Vstack()(*xs)\r\n  File \"/home/kumezawa/dev/chainer/chainer/function.py\", line 189, in __call__\r\n    self._check_data_type_forward(in_data)\r\n  File \"/home/kumezawa/dev/chainer/chainer/function.py\", line 273, in _check_data_type_forward\r\n    self.check_type_forward(in_type)\r\n  File \"/home/kumezawa/dev/chainer/chainer/functions/array/vstack.py\", line 23, in check_type_forward\r\n    type_check.expect(in_types[0].shape == in_types[i].shape)\r\n  File \"/home/kumezawa/dev/chainer/chainer/utils/type_check.py\", line 487, in expect\r\n    expr.expect()\r\n  File \"/home/kumezawa/dev/chainer/chainer/utils/type_check.py\", line 449, in expect\r\n    '{0} {1} {2}'.format(left, self.inv, right))\r\nchainer.utils.type_check.InvalidType: \r\nInvalid operation is performed in: Vstack (Forward)\r\n\r\nExpect: in_types[0].shape == in_types[1].shape\r\nActual: (12,) != (11,)\r\n```","created_at":"2017-04-24T12:09:15Z","updated_at":"2017-04-24T12:09:15Z","html_url":"https://github.com/pfnet/chainer/pull/2491#discussion_r112928693","pull_request_url":"https://api.github.com/repos/pfnet/chainer/pulls/2491","_links":{"self":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/comments/112928693"},"html":{"href":"https://github.com/pfnet/chainer/pull/2491#discussion_r112928693"},"pull_request":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/2491"}}},"pull_request":{"url":"https://api.github.com/repos/pfnet/chainer/pulls/2491","id":113874261,"html_url":"https://github.com/pfnet/chainer/pull/2491","diff_url":"https://github.com/pfnet/chainer/pull/2491.diff","patch_url":"https://github.com/pfnet/chainer/pull/2491.patch","issue_url":"https://api.github.com/repos/pfnet/chainer/issues/2491","number":2491,"state":"open","locked":false,"title":"Improve docs of stack, vstack, hstack","user":{"login":"keisuke-umezawa","id":1277089,"avatar_url":"https://avatars1.githubusercontent.com/u/1277089?v=3","gravatar_id":"","url":"https://api.github.com/users/keisuke-umezawa","html_url":"https://github.com/keisuke-umezawa","followers_url":"https://api.github.com/users/keisuke-umezawa/followers","following_url":"https://api.github.com/users/keisuke-umezawa/following{/other_user}","gists_url":"https://api.github.com/users/keisuke-umezawa/gists{/gist_id}","starred_url":"https://api.github.com/users/keisuke-umezawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keisuke-umezawa/subscriptions","organizations_url":"https://api.github.com/users/keisuke-umezawa/orgs","repos_url":"https://api.github.com/users/keisuke-umezawa/repos","events_url":"https://api.github.com/users/keisuke-umezawa/events{/privacy}","received_events_url":"https://api.github.com/users/keisuke-umezawa/received_events","type":"User","site_admin":false},"body":"This is PR for improving docs of functions/links. Related issue: #2182\r\n\r\nModified functions/links:\r\n - functions/array/stack\r\n - functions/array/hstack\r\n - functions/array/vstack\r\n\r\ndoctest result is\r\n```\r\nDocument: reference/functions\r\n-----------------------------\r\n1 items passed all tests:\r\n 117 tests in default\r\n117 tests in 1 items.\r\n117 passed and 0 failed.\r\nTest passed.\r\n```","created_at":"2017-04-03T07:51:08Z","updated_at":"2017-04-24T12:09:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"658a242b99a0e1307185f702e46eae6434b440d2","assignee":{"login":"mitmul","id":666535,"avatar_url":"https://avatars3.githubusercontent.com/u/666535?v=3","gravatar_id":"","url":"https://api.github.com/users/mitmul","html_url":"https://github.com/mitmul","followers_url":"https://api.github.com/users/mitmul/followers","following_url":"https://api.github.com/users/mitmul/following{/other_user}","gists_url":"https://api.github.com/users/mitmul/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmul/subscriptions","organizations_url":"https://api.github.com/users/mitmul/orgs","repos_url":"https://api.github.com/users/mitmul/repos","events_url":"https://api.github.com/users/mitmul/events{/privacy}","received_events_url":"https://api.github.com/users/mitmul/received_events","type":"User","site_admin":false},"assignees":[{"login":"mitmul","id":666535,"avatar_url":"https://avatars3.githubusercontent.com/u/666535?v=3","gravatar_id":"","url":"https://api.github.com/users/mitmul","html_url":"https://github.com/mitmul","followers_url":"https://api.github.com/users/mitmul/followers","following_url":"https://api.github.com/users/mitmul/following{/other_user}","gists_url":"https://api.github.com/users/mitmul/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmul/subscriptions","organizations_url":"https://api.github.com/users/mitmul/orgs","repos_url":"https://api.github.com/users/mitmul/repos","events_url":"https://api.github.com/users/mitmul/events{/privacy}","received_events_url":"https://api.github.com/users/mitmul/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pfnet/chainer/pulls/2491/commits","review_comments_url":"https://api.github.com/repos/pfnet/chainer/pulls/2491/comments","review_comment_url":"https://api.github.com/repos/pfnet/chainer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pfnet/chainer/issues/2491/comments","statuses_url":"https://api.github.com/repos/pfnet/chainer/statuses/e22a344822e0b65bab8b57f9a091befd30c32aa3","head":{"label":"pfnet:improve-docs-of-stack","ref":"improve-docs-of-stack","sha":"e22a344822e0b65bab8b57f9a091befd30c32aa3","user":{"login":"pfnet","id":9739572,"avatar_url":"https://avatars1.githubusercontent.com/u/9739572?v=3","gravatar_id":"","url":"https://api.github.com/users/pfnet","html_url":"https://github.com/pfnet","followers_url":"https://api.github.com/users/pfnet/followers","following_url":"https://api.github.com/users/pfnet/following{/other_user}","gists_url":"https://api.github.com/users/pfnet/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet/subscriptions","organizations_url":"https://api.github.com/users/pfnet/orgs","repos_url":"https://api.github.com/users/pfnet/repos","events_url":"https://api.github.com/users/pfnet/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet/received_events","type":"Organization","site_admin":false},"repo":{"id":36914478,"name":"chainer","full_name":"pfnet/chainer","owner":{"login":"pfnet","id":9739572,"avatar_url":"https://avatars1.githubusercontent.com/u/9739572?v=3","gravatar_id":"","url":"https://api.github.com/users/pfnet","html_url":"https://github.com/pfnet","followers_url":"https://api.github.com/users/pfnet/followers","following_url":"https://api.github.com/users/pfnet/following{/other_user}","gists_url":"https://api.github.com/users/pfnet/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet/subscriptions","organizations_url":"https://api.github.com/users/pfnet/orgs","repos_url":"https://api.github.com/users/pfnet/repos","events_url":"https://api.github.com/users/pfnet/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pfnet/chainer","description":"A flexible framework of neural networks for deep learning","fork":false,"url":"https://api.github.com/repos/pfnet/chainer","forks_url":"https://api.github.com/repos/pfnet/chainer/forks","keys_url":"https://api.github.com/repos/pfnet/chainer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfnet/chainer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfnet/chainer/teams","hooks_url":"https://api.github.com/repos/pfnet/chainer/hooks","issue_events_url":"https://api.github.com/repos/pfnet/chainer/issues/events{/number}","events_url":"https://api.github.com/repos/pfnet/chainer/events","assignees_url":"https://api.github.com/repos/pfnet/chainer/assignees{/user}","branches_url":"https://api.github.com/repos/pfnet/chainer/branches{/branch}","tags_url":"https://api.github.com/repos/pfnet/chainer/tags","blobs_url":"https://api.github.com/repos/pfnet/chainer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfnet/chainer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfnet/chainer/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfnet/chainer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfnet/chainer/statuses/{sha}","languages_url":"https://api.github.com/repos/pfnet/chainer/languages","stargazers_url":"https://api.github.com/repos/pfnet/chainer/stargazers","contributors_url":"https://api.github.com/repos/pfnet/chainer/contributors","subscribers_url":"https://api.github.com/repos/pfnet/chainer/subscribers","subscription_url":"https://api.github.com/repos/pfnet/chainer/subscription","commits_url":"https://api.github.com/repos/pfnet/chainer/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfnet/chainer/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfnet/chainer/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfnet/chainer/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfnet/chainer/contents/{+path}","compare_url":"https://api.github.com/repos/pfnet/chainer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfnet/chainer/merges","archive_url":"https://api.github.com/repos/pfnet/chainer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfnet/chainer/downloads","issues_url":"https://api.github.com/repos/pfnet/chainer/issues{/number}","pulls_url":"https://api.github.com/repos/pfnet/chainer/pulls{/number}","milestones_url":"https://api.github.com/repos/pfnet/chainer/milestones{/number}","notifications_url":"https://api.github.com/repos/pfnet/chainer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfnet/chainer/labels{/name}","releases_url":"https://api.github.com/repos/pfnet/chainer/releases{/id}","deployments_url":"https://api.github.com/repos/pfnet/chainer/deployments","created_at":"2015-06-05T05:50:37Z","updated_at":"2017-04-24T11:29:37Z","pushed_at":"2017-04-24T11:54:08Z","git_url":"git://github.com/pfnet/chainer.git","ssh_url":"git@github.com:pfnet/chainer.git","clone_url":"https://github.com/pfnet/chainer.git","svn_url":"https://github.com/pfnet/chainer","homepage":"http://chainer.org","size":12714,"stargazers_count":2429,"watchers_count":2429,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":635,"mirror_url":null,"open_issues_count":376,"forks":635,"open_issues":376,"watchers":2429,"default_branch":"master"}},"base":{"label":"pfnet:master","ref":"master","sha":"5760aa0df7bb59c88b144298b33865384a8b1b9f","user":{"login":"pfnet","id":9739572,"avatar_url":"https://avatars1.githubusercontent.com/u/9739572?v=3","gravatar_id":"","url":"https://api.github.com/users/pfnet","html_url":"https://github.com/pfnet","followers_url":"https://api.github.com/users/pfnet/followers","following_url":"https://api.github.com/users/pfnet/following{/other_user}","gists_url":"https://api.github.com/users/pfnet/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet/subscriptions","organizations_url":"https://api.github.com/users/pfnet/orgs","repos_url":"https://api.github.com/users/pfnet/repos","events_url":"https://api.github.com/users/pfnet/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet/received_events","type":"Organization","site_admin":false},"repo":{"id":36914478,"name":"chainer","full_name":"pfnet/chainer","owner":{"login":"pfnet","id":9739572,"avatar_url":"https://avatars1.githubusercontent.com/u/9739572?v=3","gravatar_id":"","url":"https://api.github.com/users/pfnet","html_url":"https://github.com/pfnet","followers_url":"https://api.github.com/users/pfnet/followers","following_url":"https://api.github.com/users/pfnet/following{/other_user}","gists_url":"https://api.github.com/users/pfnet/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet/subscriptions","organizations_url":"https://api.github.com/users/pfnet/orgs","repos_url":"https://api.github.com/users/pfnet/repos","events_url":"https://api.github.com/users/pfnet/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pfnet/chainer","description":"A flexible framework of neural networks for deep learning","fork":false,"url":"https://api.github.com/repos/pfnet/chainer","forks_url":"https://api.github.com/repos/pfnet/chainer/forks","keys_url":"https://api.github.com/repos/pfnet/chainer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfnet/chainer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfnet/chainer/teams","hooks_url":"https://api.github.com/repos/pfnet/chainer/hooks","issue_events_url":"https://api.github.com/repos/pfnet/chainer/issues/events{/number}","events_url":"https://api.github.com/repos/pfnet/chainer/events","assignees_url":"https://api.github.com/repos/pfnet/chainer/assignees{/user}","branches_url":"https://api.github.com/repos/pfnet/chainer/branches{/branch}","tags_url":"https://api.github.com/repos/pfnet/chainer/tags","blobs_url":"https://api.github.com/repos/pfnet/chainer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfnet/chainer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfnet/chainer/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfnet/chainer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfnet/chainer/statuses/{sha}","languages_url":"https://api.github.com/repos/pfnet/chainer/languages","stargazers_url":"https://api.github.com/repos/pfnet/chainer/stargazers","contributors_url":"https://api.github.com/repos/pfnet/chainer/contributors","subscribers_url":"https://api.github.com/repos/pfnet/chainer/subscribers","subscription_url":"https://api.github.com/repos/pfnet/chainer/subscription","commits_url":"https://api.github.com/repos/pfnet/chainer/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfnet/chainer/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfnet/chainer/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfnet/chainer/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfnet/chainer/contents/{+path}","compare_url":"https://api.github.com/repos/pfnet/chainer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfnet/chainer/merges","archive_url":"https://api.github.com/repos/pfnet/chainer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfnet/chainer/downloads","issues_url":"https://api.github.com/repos/pfnet/chainer/issues{/number}","pulls_url":"https://api.github.com/repos/pfnet/chainer/pulls{/number}","milestones_url":"https://api.github.com/repos/pfnet/chainer/milestones{/number}","notifications_url":"https://api.github.com/repos/pfnet/chainer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfnet/chainer/labels{/name}","releases_url":"https://api.github.com/repos/pfnet/chainer/releases{/id}","deployments_url":"https://api.github.com/repos/pfnet/chainer/deployments","created_at":"2015-06-05T05:50:37Z","updated_at":"2017-04-24T11:29:37Z","pushed_at":"2017-04-24T11:54:08Z","git_url":"git://github.com/pfnet/chainer.git","ssh_url":"git@github.com:pfnet/chainer.git","clone_url":"https://github.com/pfnet/chainer.git","svn_url":"https://github.com/pfnet/chainer","homepage":"http://chainer.org","size":12714,"stargazers_count":2429,"watchers_count":2429,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":635,"mirror_url":null,"open_issues_count":376,"forks":635,"open_issues":376,"watchers":2429,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/2491"},"html":{"href":"https://github.com/pfnet/chainer/pull/2491"},"issue":{"href":"https://api.github.com/repos/pfnet/chainer/issues/2491"},"comments":{"href":"https://api.github.com/repos/pfnet/chainer/issues/2491/comments"},"review_comments":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/2491/comments"},"review_comment":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/2491/commits"},"statuses":{"href":"https://api.github.com/repos/pfnet/chainer/statuses/e22a344822e0b65bab8b57f9a091befd30c32aa3"}}}}
{"actor":{"display_login":"keisuke-umezawa"}}