{"action":"created","comment":{"url":"https://api.github.com/repos/numba/numba/pulls/comments/39421538","id":39421538,"diff_hunk":"@@ -72,14 +72,15 @@ def _handle_inputs(cls, ufunc, args, kws):\n             layout = 'C'\n             layouts = [x.layout if isinstance(x, types.Array) else ''\n                        for x in args]\n+\n+            # Prefer C contig if any array is C contig\n             if 'C' not in layouts:\n+                # Next, prefer F contig\n                 if 'F' in layouts:\n                     layout = 'F'\n+                # If none of the arrays are C or F, default to C\n                 elif 'A' in layouts:\n-                    # See also _empty_nd_impl() in numba.targets.arrayobj.\n-                    raise NotImplementedError(\n-                        \"Don't know how to create implicit output array \"\n-                        \"with 'A' layout.\")\n+                    layout = 'C'","path":"numba/typing/npydecl.py","position":16,"original_position":16,"commit_id":"844d1087ed02ff9abfd5c166a1d66c79c81b6928","original_commit_id":"844d1087ed02ff9abfd5c166a1d66c79c81b6928","user":{"login":"pitrou","id":1721820,"avatar_url":"https://avatars.githubusercontent.com/u/1721820?v=3","gravatar_id":"","url":"https://api.github.com/users/pitrou","html_url":"https://github.com/pitrou","followers_url":"https://api.github.com/users/pitrou/followers","following_url":"https://api.github.com/users/pitrou/following{/other_user}","gists_url":"https://api.github.com/users/pitrou/gists{/gist_id}","starred_url":"https://api.github.com/users/pitrou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitrou/subscriptions","organizations_url":"https://api.github.com/users/pitrou/orgs","repos_url":"https://api.github.com/users/pitrou/repos","events_url":"https://api.github.com/users/pitrou/events{/privacy}","received_events_url":"https://api.github.com/users/pitrou/received_events","type":"User","site_admin":false},"body":"The whole conditional can probably be simplified, since layout is \"C\" except if `'F' in layouts and 'C' not in layouts`.","created_at":"2015-09-14T17:30:26Z","updated_at":"2015-09-14T17:30:26Z","html_url":"https://github.com/numba/numba/pull/1421#discussion_r39421538","pull_request_url":"https://api.github.com/repos/numba/numba/pulls/1421","_links":{"self":{"href":"https://api.github.com/repos/numba/numba/pulls/comments/39421538"},"html":{"href":"https://github.com/numba/numba/pull/1421#discussion_r39421538"},"pull_request":{"href":"https://api.github.com/repos/numba/numba/pulls/1421"}}},"pull_request":{"url":"https://api.github.com/repos/numba/numba/pulls/1421","id":44956133,"html_url":"https://github.com/numba/numba/pull/1421","diff_url":"https://github.com/numba/numba/pull/1421.diff","patch_url":"https://github.com/numba/numba/pull/1421.patch","issue_url":"https://api.github.com/repos/numba/numba/issues/1421","number":1421,"state":"open","locked":false,"title":"Implement implicit output layout for 'A' layout","user":{"login":"sklam","id":1929845,"avatar_url":"https://avatars.githubusercontent.com/u/1929845?v=3","gravatar_id":"","url":"https://api.github.com/users/sklam","html_url":"https://github.com/sklam","followers_url":"https://api.github.com/users/sklam/followers","following_url":"https://api.github.com/users/sklam/following{/other_user}","gists_url":"https://api.github.com/users/sklam/gists{/gist_id}","starred_url":"https://api.github.com/users/sklam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sklam/subscriptions","organizations_url":"https://api.github.com/users/sklam/orgs","repos_url":"https://api.github.com/users/sklam/repos","events_url":"https://api.github.com/users/sklam/events{/privacy}","received_events_url":"https://api.github.com/users/sklam/received_events","type":"User","site_admin":false},"body":"This fixes issue #1418.\r\n\r\nThis completes the ufunc layout handling for A layout.\r\nThe numpy logic appears to prefer 'C' if any input is it, then, 'F' layout if any input is it.  Otherwise, default to 'C' layout if all inputs are of 'A' layout.\r\n\r\n","created_at":"2015-09-14T17:16:09Z","updated_at":"2015-09-14T17:30:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99cf88ca11c69a3e1a6203fff9b50b8e696bc502","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numba/numba/pulls/1421/commits","review_comments_url":"https://api.github.com/repos/numba/numba/pulls/1421/comments","review_comment_url":"https://api.github.com/repos/numba/numba/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numba/numba/issues/1421/comments","statuses_url":"https://api.github.com/repos/numba/numba/statuses/844d1087ed02ff9abfd5c166a1d66c79c81b6928","head":{"label":"sklam:fix/issue_1418","ref":"fix/issue_1418","sha":"844d1087ed02ff9abfd5c166a1d66c79c81b6928","user":{"login":"sklam","id":1929845,"avatar_url":"https://avatars.githubusercontent.com/u/1929845?v=3","gravatar_id":"","url":"https://api.github.com/users/sklam","html_url":"https://github.com/sklam","followers_url":"https://api.github.com/users/sklam/followers","following_url":"https://api.github.com/users/sklam/following{/other_user}","gists_url":"https://api.github.com/users/sklam/gists{/gist_id}","starred_url":"https://api.github.com/users/sklam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sklam/subscriptions","organizations_url":"https://api.github.com/users/sklam/orgs","repos_url":"https://api.github.com/users/sklam/repos","events_url":"https://api.github.com/users/sklam/events{/privacy}","received_events_url":"https://api.github.com/users/sklam/received_events","type":"User","site_admin":false},"repo":{"id":4992750,"name":"numba","full_name":"sklam/numba","owner":{"login":"sklam","id":1929845,"avatar_url":"https://avatars.githubusercontent.com/u/1929845?v=3","gravatar_id":"","url":"https://api.github.com/users/sklam","html_url":"https://github.com/sklam","followers_url":"https://api.github.com/users/sklam/followers","following_url":"https://api.github.com/users/sklam/following{/other_user}","gists_url":"https://api.github.com/users/sklam/gists{/gist_id}","starred_url":"https://api.github.com/users/sklam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sklam/subscriptions","organizations_url":"https://api.github.com/users/sklam/orgs","repos_url":"https://api.github.com/users/sklam/repos","events_url":"https://api.github.com/users/sklam/events{/privacy}","received_events_url":"https://api.github.com/users/sklam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sklam/numba","description":"NumPy aware dynamic Python compiler using LLVM","fork":true,"url":"https://api.github.com/repos/sklam/numba","forks_url":"https://api.github.com/repos/sklam/numba/forks","keys_url":"https://api.github.com/repos/sklam/numba/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sklam/numba/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sklam/numba/teams","hooks_url":"https://api.github.com/repos/sklam/numba/hooks","issue_events_url":"https://api.github.com/repos/sklam/numba/issues/events{/number}","events_url":"https://api.github.com/repos/sklam/numba/events","assignees_url":"https://api.github.com/repos/sklam/numba/assignees{/user}","branches_url":"https://api.github.com/repos/sklam/numba/branches{/branch}","tags_url":"https://api.github.com/repos/sklam/numba/tags","blobs_url":"https://api.github.com/repos/sklam/numba/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sklam/numba/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sklam/numba/git/refs{/sha}","trees_url":"https://api.github.com/repos/sklam/numba/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sklam/numba/statuses/{sha}","languages_url":"https://api.github.com/repos/sklam/numba/languages","stargazers_url":"https://api.github.com/repos/sklam/numba/stargazers","contributors_url":"https://api.github.com/repos/sklam/numba/contributors","subscribers_url":"https://api.github.com/repos/sklam/numba/subscribers","subscription_url":"https://api.github.com/repos/sklam/numba/subscription","commits_url":"https://api.github.com/repos/sklam/numba/commits{/sha}","git_commits_url":"https://api.github.com/repos/sklam/numba/git/commits{/sha}","comments_url":"https://api.github.com/repos/sklam/numba/comments{/number}","issue_comment_url":"https://api.github.com/repos/sklam/numba/issues/comments{/number}","contents_url":"https://api.github.com/repos/sklam/numba/contents/{+path}","compare_url":"https://api.github.com/repos/sklam/numba/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sklam/numba/merges","archive_url":"https://api.github.com/repos/sklam/numba/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sklam/numba/downloads","issues_url":"https://api.github.com/repos/sklam/numba/issues{/number}","pulls_url":"https://api.github.com/repos/sklam/numba/pulls{/number}","milestones_url":"https://api.github.com/repos/sklam/numba/milestones{/number}","notifications_url":"https://api.github.com/repos/sklam/numba/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sklam/numba/labels{/name}","releases_url":"https://api.github.com/repos/sklam/numba/releases{/id}","created_at":"2012-07-11T17:49:38Z","updated_at":"2015-04-21T17:10:09Z","pushed_at":"2015-09-14T17:12:55Z","git_url":"git://github.com/sklam/numba.git","ssh_url":"git@github.com:sklam/numba.git","clone_url":"https://github.com/sklam/numba.git","svn_url":"https://github.com/sklam/numba","homepage":"","size":26178,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"numba:master","ref":"master","sha":"c789d1d987064da2330b83931589a6c5f2e85952","user":{"login":"numba","id":1628082,"avatar_url":"https://avatars.githubusercontent.com/u/1628082?v=3","gravatar_id":"","url":"https://api.github.com/users/numba","html_url":"https://github.com/numba","followers_url":"https://api.github.com/users/numba/followers","following_url":"https://api.github.com/users/numba/following{/other_user}","gists_url":"https://api.github.com/users/numba/gists{/gist_id}","starred_url":"https://api.github.com/users/numba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numba/subscriptions","organizations_url":"https://api.github.com/users/numba/orgs","repos_url":"https://api.github.com/users/numba/repos","events_url":"https://api.github.com/users/numba/events{/privacy}","received_events_url":"https://api.github.com/users/numba/received_events","type":"Organization","site_admin":false},"repo":{"id":3659275,"name":"numba","full_name":"numba/numba","owner":{"login":"numba","id":1628082,"avatar_url":"https://avatars.githubusercontent.com/u/1628082?v=3","gravatar_id":"","url":"https://api.github.com/users/numba","html_url":"https://github.com/numba","followers_url":"https://api.github.com/users/numba/followers","following_url":"https://api.github.com/users/numba/following{/other_user}","gists_url":"https://api.github.com/users/numba/gists{/gist_id}","starred_url":"https://api.github.com/users/numba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numba/subscriptions","organizations_url":"https://api.github.com/users/numba/orgs","repos_url":"https://api.github.com/users/numba/repos","events_url":"https://api.github.com/users/numba/events{/privacy}","received_events_url":"https://api.github.com/users/numba/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numba/numba","description":"NumPy aware dynamic Python compiler using LLVM","fork":false,"url":"https://api.github.com/repos/numba/numba","forks_url":"https://api.github.com/repos/numba/numba/forks","keys_url":"https://api.github.com/repos/numba/numba/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numba/numba/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numba/numba/teams","hooks_url":"https://api.github.com/repos/numba/numba/hooks","issue_events_url":"https://api.github.com/repos/numba/numba/issues/events{/number}","events_url":"https://api.github.com/repos/numba/numba/events","assignees_url":"https://api.github.com/repos/numba/numba/assignees{/user}","branches_url":"https://api.github.com/repos/numba/numba/branches{/branch}","tags_url":"https://api.github.com/repos/numba/numba/tags","blobs_url":"https://api.github.com/repos/numba/numba/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numba/numba/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numba/numba/git/refs{/sha}","trees_url":"https://api.github.com/repos/numba/numba/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numba/numba/statuses/{sha}","languages_url":"https://api.github.com/repos/numba/numba/languages","stargazers_url":"https://api.github.com/repos/numba/numba/stargazers","contributors_url":"https://api.github.com/repos/numba/numba/contributors","subscribers_url":"https://api.github.com/repos/numba/numba/subscribers","subscription_url":"https://api.github.com/repos/numba/numba/subscription","commits_url":"https://api.github.com/repos/numba/numba/commits{/sha}","git_commits_url":"https://api.github.com/repos/numba/numba/git/commits{/sha}","comments_url":"https://api.github.com/repos/numba/numba/comments{/number}","issue_comment_url":"https://api.github.com/repos/numba/numba/issues/comments{/number}","contents_url":"https://api.github.com/repos/numba/numba/contents/{+path}","compare_url":"https://api.github.com/repos/numba/numba/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numba/numba/merges","archive_url":"https://api.github.com/repos/numba/numba/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numba/numba/downloads","issues_url":"https://api.github.com/repos/numba/numba/issues{/number}","pulls_url":"https://api.github.com/repos/numba/numba/pulls{/number}","milestones_url":"https://api.github.com/repos/numba/numba/milestones{/number}","notifications_url":"https://api.github.com/repos/numba/numba/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numba/numba/labels{/name}","releases_url":"https://api.github.com/repos/numba/numba/releases{/id}","created_at":"2012-03-08T11:12:43Z","updated_at":"2015-09-12T09:52:19Z","pushed_at":"2015-09-14T17:16:09Z","git_url":"git://github.com/numba/numba.git","ssh_url":"git@github.com:numba/numba.git","clone_url":"https://github.com/numba/numba.git","svn_url":"https://github.com/numba/numba","homepage":"http://numba.pydata.org/","size":35761,"stargazers_count":1553,"watchers_count":1553,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":164,"mirror_url":null,"open_issues_count":204,"forks":164,"open_issues":204,"watchers":1553,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numba/numba/pulls/1421"},"html":{"href":"https://github.com/numba/numba/pull/1421"},"issue":{"href":"https://api.github.com/repos/numba/numba/issues/1421"},"comments":{"href":"https://api.github.com/repos/numba/numba/issues/1421/comments"},"review_comments":{"href":"https://api.github.com/repos/numba/numba/pulls/1421/comments"},"review_comment":{"href":"https://api.github.com/repos/numba/numba/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numba/numba/pulls/1421/commits"},"statuses":{"href":"https://api.github.com/repos/numba/numba/statuses/844d1087ed02ff9abfd5c166a1d66c79c81b6928"}}}}