{"action":"created","comment":{"url":"https://api.github.com/repos/numpy/numpy/pulls/comments/25927227","id":25927227,"diff_hunk":"@@ -401,11 +402,17 @@ def asarray(a, dtype=None, order=None):\n         Input data, in any form that can be converted to an array.  This\n         includes lists, lists of tuples, tuples, tuples of tuples, tuples\n         of lists and ndarrays.\n-    dtype : data-type, optional\n+    dtype : {None, data-type}, optional\n         By default, the data-type is inferred from the input data.\n-    order : {'C', 'F'}, optional\n-        Whether to use row-major ('C') or column-major ('F' for FORTRAN)\n-        memory representation.  Defaults to 'C'.\n+    order : {'C', 'F', 'A'}, optional\n+        Whether to use row-major ('C'), column-major ('F'), or any ('A')\n+        memory representation.  Defaults to 'A'.\n+    precision: {None, dtype, ndarray, scalar}, optional","path":"numpy/core/numeric.py","position":23,"original_position":23,"commit_id":"e4b8d6177d1482c2a474413a22ea74a7bfd9e881","original_commit_id":"e4b8d6177d1482c2a474413a22ea74a7bfd9e881","user":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"body":"``result_type`` is an implementation detail here and has very little to do with ``asarray``, so no need to follow it. Allowing specification the same way as you'd specify any dtype is much clearer imho.","created_at":"2015-03-06T05:56:51Z","updated_at":"2015-03-06T05:56:51Z","html_url":"https://github.com/numpy/numpy/pull/5634#discussion_r25927227","pull_request_url":"https://api.github.com/repos/numpy/numpy/pulls/5634","_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments/25927227"},"html":{"href":"https://github.com/numpy/numpy/pull/5634#discussion_r25927227"},"pull_request":{"href":"https://api.github.com/repos/numpy/numpy/pulls/5634"}}},"pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/5634","id":30519158,"html_url":"https://github.com/numpy/numpy/pull/5634","diff_url":"https://github.com/numpy/numpy/pull/5634.diff","patch_url":"https://github.com/numpy/numpy/pull/5634.patch","issue_url":"https://api.github.com/repos/numpy/numpy/issues/5634","number":5634,"state":"open","locked":false,"title":"ENH: Add a precision keyword to asarray and asanyarray.","user":{"login":"charris","id":77272,"avatar_url":"https://avatars.githubusercontent.com/u/77272?v=3","gravatar_id":"","url":"https://api.github.com/users/charris","html_url":"https://github.com/charris","followers_url":"https://api.github.com/users/charris/followers","following_url":"https://api.github.com/users/charris/following{/other_user}","gists_url":"https://api.github.com/users/charris/gists{/gist_id}","starred_url":"https://api.github.com/users/charris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charris/subscriptions","organizations_url":"https://api.github.com/users/charris/orgs","repos_url":"https://api.github.com/users/charris/repos","events_url":"https://api.github.com/users/charris/events{/privacy}","received_events_url":"https://api.github.com/users/charris/received_events","type":"User","site_admin":false},"body":"The precision keyword differs from the current dtype keyword in the following way.\r\n    \r\n* It specifies a minimum precision. If the precision of the input is\r\n   greater than the specified precision, the input precision is preserved.\r\n* Complex types are preserved. A specifies floating  precision applies\r\n    to the dtype of the real and complex parts separately.\r\n    \r\nFor example, both complex128 and float64 dtypes have the \r\nsame precision and an array of dtype float64 will be unchanged if the\r\nspecified precision is float32.\r\n    \r\nIdeally the precision keyword would be pushed down into the array\r\nconstructor so that the resulting dtype could be determined before the\r\narray is constructed, but that would require adding new functions as the\r\ncurrent constructors are part of the API and cannot have their\r\nsignatures changed.\r\n","created_at":"2015-03-05T00:24:54Z","updated_at":"2015-03-06T05:56:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2a0193ba8d2f4518978c884e9b71e4eb3a215d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numpy/numpy/pulls/5634/commits","review_comments_url":"https://api.github.com/repos/numpy/numpy/pulls/5634/comments","review_comment_url":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/5634/comments","statuses_url":"https://api.github.com/repos/numpy/numpy/statuses/e4b8d6177d1482c2a474413a22ea74a7bfd9e881","head":{"label":"charris:add-asarray-precision","ref":"add-asarray-precision","sha":"e4b8d6177d1482c2a474413a22ea74a7bfd9e881","user":{"login":"charris","id":77272,"avatar_url":"https://avatars.githubusercontent.com/u/77272?v=3","gravatar_id":"","url":"https://api.github.com/users/charris","html_url":"https://github.com/charris","followers_url":"https://api.github.com/users/charris/followers","following_url":"https://api.github.com/users/charris/following{/other_user}","gists_url":"https://api.github.com/users/charris/gists{/gist_id}","starred_url":"https://api.github.com/users/charris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charris/subscriptions","organizations_url":"https://api.github.com/users/charris/orgs","repos_url":"https://api.github.com/users/charris/repos","events_url":"https://api.github.com/users/charris/events{/privacy}","received_events_url":"https://api.github.com/users/charris/received_events","type":"User","site_admin":false},"repo":{"id":908701,"name":"numpy","full_name":"charris/numpy","owner":{"login":"charris","id":77272,"avatar_url":"https://avatars.githubusercontent.com/u/77272?v=3","gravatar_id":"","url":"https://api.github.com/users/charris","html_url":"https://github.com/charris","followers_url":"https://api.github.com/users/charris/followers","following_url":"https://api.github.com/users/charris/following{/other_user}","gists_url":"https://api.github.com/users/charris/gists{/gist_id}","starred_url":"https://api.github.com/users/charris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charris/subscriptions","organizations_url":"https://api.github.com/users/charris/orgs","repos_url":"https://api.github.com/users/charris/repos","events_url":"https://api.github.com/users/charris/events{/privacy}","received_events_url":"https://api.github.com/users/charris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/charris/numpy","description":"Fork of numpy/numpy","fork":true,"url":"https://api.github.com/repos/charris/numpy","forks_url":"https://api.github.com/repos/charris/numpy/forks","keys_url":"https://api.github.com/repos/charris/numpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/charris/numpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/charris/numpy/teams","hooks_url":"https://api.github.com/repos/charris/numpy/hooks","issue_events_url":"https://api.github.com/repos/charris/numpy/issues/events{/number}","events_url":"https://api.github.com/repos/charris/numpy/events","assignees_url":"https://api.github.com/repos/charris/numpy/assignees{/user}","branches_url":"https://api.github.com/repos/charris/numpy/branches{/branch}","tags_url":"https://api.github.com/repos/charris/numpy/tags","blobs_url":"https://api.github.com/repos/charris/numpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/charris/numpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/charris/numpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/charris/numpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/charris/numpy/statuses/{sha}","languages_url":"https://api.github.com/repos/charris/numpy/languages","stargazers_url":"https://api.github.com/repos/charris/numpy/stargazers","contributors_url":"https://api.github.com/repos/charris/numpy/contributors","subscribers_url":"https://api.github.com/repos/charris/numpy/subscribers","subscription_url":"https://api.github.com/repos/charris/numpy/subscription","commits_url":"https://api.github.com/repos/charris/numpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/charris/numpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/charris/numpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/charris/numpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/charris/numpy/contents/{+path}","compare_url":"https://api.github.com/repos/charris/numpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/charris/numpy/merges","archive_url":"https://api.github.com/repos/charris/numpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/charris/numpy/downloads","issues_url":"https://api.github.com/repos/charris/numpy/issues{/number}","pulls_url":"https://api.github.com/repos/charris/numpy/pulls{/number}","milestones_url":"https://api.github.com/repos/charris/numpy/milestones{/number}","notifications_url":"https://api.github.com/repos/charris/numpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/charris/numpy/labels{/name}","releases_url":"https://api.github.com/repos/charris/numpy/releases{/id}","created_at":"2010-09-13T23:57:46Z","updated_at":"2015-02-27T17:35:10Z","pushed_at":"2015-03-05T00:19:23Z","git_url":"git://github.com/charris/numpy.git","ssh_url":"git@github.com:charris/numpy.git","clone_url":"https://github.com/charris/numpy.git","svn_url":"https://github.com/charris/numpy","homepage":"","size":39817,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"numpy:master","ref":"master","sha":"4cba5310c7b8d1a3aab7202209d238f569a8f9ff","user":{"login":"numpy","id":288276,"avatar_url":"https://avatars.githubusercontent.com/u/288276?v=3","gravatar_id":"","url":"https://api.github.com/users/numpy","html_url":"https://github.com/numpy","followers_url":"https://api.github.com/users/numpy/followers","following_url":"https://api.github.com/users/numpy/following{/other_user}","gists_url":"https://api.github.com/users/numpy/gists{/gist_id}","starred_url":"https://api.github.com/users/numpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numpy/subscriptions","organizations_url":"https://api.github.com/users/numpy/orgs","repos_url":"https://api.github.com/users/numpy/repos","events_url":"https://api.github.com/users/numpy/events{/privacy}","received_events_url":"https://api.github.com/users/numpy/received_events","type":"Organization","site_admin":false},"repo":{"id":908607,"name":"numpy","full_name":"numpy/numpy","owner":{"login":"numpy","id":288276,"avatar_url":"https://avatars.githubusercontent.com/u/288276?v=3","gravatar_id":"","url":"https://api.github.com/users/numpy","html_url":"https://github.com/numpy","followers_url":"https://api.github.com/users/numpy/followers","following_url":"https://api.github.com/users/numpy/following{/other_user}","gists_url":"https://api.github.com/users/numpy/gists{/gist_id}","starred_url":"https://api.github.com/users/numpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numpy/subscriptions","organizations_url":"https://api.github.com/users/numpy/orgs","repos_url":"https://api.github.com/users/numpy/repos","events_url":"https://api.github.com/users/numpy/events{/privacy}","received_events_url":"https://api.github.com/users/numpy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numpy/numpy","description":"Numpy main repository","fork":false,"url":"https://api.github.com/repos/numpy/numpy","forks_url":"https://api.github.com/repos/numpy/numpy/forks","keys_url":"https://api.github.com/repos/numpy/numpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numpy/numpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numpy/numpy/teams","hooks_url":"https://api.github.com/repos/numpy/numpy/hooks","issue_events_url":"https://api.github.com/repos/numpy/numpy/issues/events{/number}","events_url":"https://api.github.com/repos/numpy/numpy/events","assignees_url":"https://api.github.com/repos/numpy/numpy/assignees{/user}","branches_url":"https://api.github.com/repos/numpy/numpy/branches{/branch}","tags_url":"https://api.github.com/repos/numpy/numpy/tags","blobs_url":"https://api.github.com/repos/numpy/numpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numpy/numpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numpy/numpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/numpy/numpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numpy/numpy/statuses/{sha}","languages_url":"https://api.github.com/repos/numpy/numpy/languages","stargazers_url":"https://api.github.com/repos/numpy/numpy/stargazers","contributors_url":"https://api.github.com/repos/numpy/numpy/contributors","subscribers_url":"https://api.github.com/repos/numpy/numpy/subscribers","subscription_url":"https://api.github.com/repos/numpy/numpy/subscription","commits_url":"https://api.github.com/repos/numpy/numpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/numpy/numpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/numpy/numpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/numpy/numpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/numpy/numpy/contents/{+path}","compare_url":"https://api.github.com/repos/numpy/numpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numpy/numpy/merges","archive_url":"https://api.github.com/repos/numpy/numpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numpy/numpy/downloads","issues_url":"https://api.github.com/repos/numpy/numpy/issues{/number}","pulls_url":"https://api.github.com/repos/numpy/numpy/pulls{/number}","milestones_url":"https://api.github.com/repos/numpy/numpy/milestones{/number}","notifications_url":"https://api.github.com/repos/numpy/numpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numpy/numpy/labels{/name}","releases_url":"https://api.github.com/repos/numpy/numpy/releases{/id}","created_at":"2010-09-13T23:02:39Z","updated_at":"2015-03-06T04:22:29Z","pushed_at":"2015-03-04T21:49:57Z","git_url":"git://github.com/numpy/numpy.git","ssh_url":"git@github.com:numpy/numpy.git","clone_url":"https://github.com/numpy/numpy.git","svn_url":"https://github.com/numpy/numpy","homepage":"http://www.numpy.org/","size":62444,"stargazers_count":1800,"watchers_count":1800,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":901,"mirror_url":null,"open_issues_count":806,"forks":901,"open_issues":806,"watchers":1800,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/5634"},"html":{"href":"https://github.com/numpy/numpy/pull/5634"},"issue":{"href":"https://api.github.com/repos/numpy/numpy/issues/5634"},"comments":{"href":"https://api.github.com/repos/numpy/numpy/issues/5634/comments"},"review_comments":{"href":"https://api.github.com/repos/numpy/numpy/pulls/5634/comments"},"review_comment":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numpy/numpy/pulls/5634/commits"},"statuses":{"href":"https://api.github.com/repos/numpy/numpy/statuses/e4b8d6177d1482c2a474413a22ea74a7bfd9e881"}}}}