{"action":"opened","number":142,"pull_request":{"url":"https://api.github.com/repos/hgrecco/pyvisa/pulls/142","id":34310134,"html_url":"https://github.com/hgrecco/pyvisa/pull/142","diff_url":"https://github.com/hgrecco/pyvisa/pull/142.diff","patch_url":"https://github.com/hgrecco/pyvisa/pull/142.patch","issue_url":"https://api.github.com/repos/hgrecco/pyvisa/issues/142","number":142,"state":"open","locked":false,"title":"Make container=numpy.array work consistently","user":{"login":"daritter","id":1186338,"avatar_url":"https://avatars.githubusercontent.com/u/1186338?v=3","gravatar_id":"","url":"https://api.github.com/users/daritter","html_url":"https://github.com/daritter","followers_url":"https://api.github.com/users/daritter/followers","following_url":"https://api.github.com/users/daritter/following{/other_user}","gists_url":"https://api.github.com/users/daritter/gists{/gist_id}","starred_url":"https://api.github.com/users/daritter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daritter/subscriptions","organizations_url":"https://api.github.com/users/daritter/orgs","repos_url":"https://api.github.com/users/daritter/repos","events_url":"https://api.github.com/users/daritter/events{/privacy}","received_events_url":"https://api.github.com/users/daritter/received_events","type":"User","site_admin":false},"body":"the line `values = inst.query_ascii_values('CURV?', container=numpy.array)`\r\nfrom the documentation does not work as expected: it returns an 0-dim numpy\r\narray with a generator object as content.\r\n\r\nexample code to verify:\r\n```\r\nfrom __future__ import print_function, unicode_literals\r\nimport numpy\r\nfrom pyvisa import util\r\n\r\nvalues = util.from_ascii_block(\"1,2,3,4\", container=numpy.array)\r\nprint(values)\r\nprint(len(values))\r\n```\r\nwill throw a `TypeError: len() of unsized object` on 2.7 and 3.4. It works for\r\nbinary values as these are parsed into a tuple with struct.unpack so\r\n`numpy.array()` works as expected.\r\n\r\nThis commit makes query_binary_values and query_ascii_values behave\r\nconsistently but will construct a temporary list.","created_at":"2015-04-28T20:55:02Z","updated_at":"2015-04-28T20:55:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hgrecco/pyvisa/pulls/142/commits","review_comments_url":"https://api.github.com/repos/hgrecco/pyvisa/pulls/142/comments","review_comment_url":"https://api.github.com/repos/hgrecco/pyvisa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hgrecco/pyvisa/issues/142/comments","statuses_url":"https://api.github.com/repos/hgrecco/pyvisa/statuses/958dfa620b8b566854f80652db2ec5e7e61a69fd","head":{"label":"daritter:ascii_numpyarray","ref":"ascii_numpyarray","sha":"958dfa620b8b566854f80652db2ec5e7e61a69fd","user":{"login":"daritter","id":1186338,"avatar_url":"https://avatars.githubusercontent.com/u/1186338?v=3","gravatar_id":"","url":"https://api.github.com/users/daritter","html_url":"https://github.com/daritter","followers_url":"https://api.github.com/users/daritter/followers","following_url":"https://api.github.com/users/daritter/following{/other_user}","gists_url":"https://api.github.com/users/daritter/gists{/gist_id}","starred_url":"https://api.github.com/users/daritter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daritter/subscriptions","organizations_url":"https://api.github.com/users/daritter/orgs","repos_url":"https://api.github.com/users/daritter/repos","events_url":"https://api.github.com/users/daritter/events{/privacy}","received_events_url":"https://api.github.com/users/daritter/received_events","type":"User","site_admin":false},"repo":{"id":34747586,"name":"pyvisa","full_name":"daritter/pyvisa","owner":{"login":"daritter","id":1186338,"avatar_url":"https://avatars.githubusercontent.com/u/1186338?v=3","gravatar_id":"","url":"https://api.github.com/users/daritter","html_url":"https://github.com/daritter","followers_url":"https://api.github.com/users/daritter/followers","following_url":"https://api.github.com/users/daritter/following{/other_user}","gists_url":"https://api.github.com/users/daritter/gists{/gist_id}","starred_url":"https://api.github.com/users/daritter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daritter/subscriptions","organizations_url":"https://api.github.com/users/daritter/orgs","repos_url":"https://api.github.com/users/daritter/repos","events_url":"https://api.github.com/users/daritter/events{/privacy}","received_events_url":"https://api.github.com/users/daritter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daritter/pyvisa","description":"A Python package with bindings to the \"Virtual Instrument Software Architecture\" VISA library, in order to control measurement devices and test equipment via GPIB, RS232, or USB.","fork":true,"url":"https://api.github.com/repos/daritter/pyvisa","forks_url":"https://api.github.com/repos/daritter/pyvisa/forks","keys_url":"https://api.github.com/repos/daritter/pyvisa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daritter/pyvisa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daritter/pyvisa/teams","hooks_url":"https://api.github.com/repos/daritter/pyvisa/hooks","issue_events_url":"https://api.github.com/repos/daritter/pyvisa/issues/events{/number}","events_url":"https://api.github.com/repos/daritter/pyvisa/events","assignees_url":"https://api.github.com/repos/daritter/pyvisa/assignees{/user}","branches_url":"https://api.github.com/repos/daritter/pyvisa/branches{/branch}","tags_url":"https://api.github.com/repos/daritter/pyvisa/tags","blobs_url":"https://api.github.com/repos/daritter/pyvisa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daritter/pyvisa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daritter/pyvisa/git/refs{/sha}","trees_url":"https://api.github.com/repos/daritter/pyvisa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daritter/pyvisa/statuses/{sha}","languages_url":"https://api.github.com/repos/daritter/pyvisa/languages","stargazers_url":"https://api.github.com/repos/daritter/pyvisa/stargazers","contributors_url":"https://api.github.com/repos/daritter/pyvisa/contributors","subscribers_url":"https://api.github.com/repos/daritter/pyvisa/subscribers","subscription_url":"https://api.github.com/repos/daritter/pyvisa/subscription","commits_url":"https://api.github.com/repos/daritter/pyvisa/commits{/sha}","git_commits_url":"https://api.github.com/repos/daritter/pyvisa/git/commits{/sha}","comments_url":"https://api.github.com/repos/daritter/pyvisa/comments{/number}","issue_comment_url":"https://api.github.com/repos/daritter/pyvisa/issues/comments{/number}","contents_url":"https://api.github.com/repos/daritter/pyvisa/contents/{+path}","compare_url":"https://api.github.com/repos/daritter/pyvisa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daritter/pyvisa/merges","archive_url":"https://api.github.com/repos/daritter/pyvisa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daritter/pyvisa/downloads","issues_url":"https://api.github.com/repos/daritter/pyvisa/issues{/number}","pulls_url":"https://api.github.com/repos/daritter/pyvisa/pulls{/number}","milestones_url":"https://api.github.com/repos/daritter/pyvisa/milestones{/number}","notifications_url":"https://api.github.com/repos/daritter/pyvisa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daritter/pyvisa/labels{/name}","releases_url":"https://api.github.com/repos/daritter/pyvisa/releases{/id}","created_at":"2015-04-28T18:11:59Z","updated_at":"2015-04-28T18:11:59Z","pushed_at":"2015-04-28T20:53:30Z","git_url":"git://github.com/daritter/pyvisa.git","ssh_url":"git@github.com:daritter/pyvisa.git","clone_url":"https://github.com/daritter/pyvisa.git","svn_url":"https://github.com/daritter/pyvisa","homepage":null,"size":2366,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"hgrecco:master","ref":"master","sha":"e0eee7d28f5e85f13510fd2617c6dbece717b798","user":{"login":"hgrecco","id":278566,"avatar_url":"https://avatars.githubusercontent.com/u/278566?v=3","gravatar_id":"","url":"https://api.github.com/users/hgrecco","html_url":"https://github.com/hgrecco","followers_url":"https://api.github.com/users/hgrecco/followers","following_url":"https://api.github.com/users/hgrecco/following{/other_user}","gists_url":"https://api.github.com/users/hgrecco/gists{/gist_id}","starred_url":"https://api.github.com/users/hgrecco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgrecco/subscriptions","organizations_url":"https://api.github.com/users/hgrecco/orgs","repos_url":"https://api.github.com/users/hgrecco/repos","events_url":"https://api.github.com/users/hgrecco/events{/privacy}","received_events_url":"https://api.github.com/users/hgrecco/received_events","type":"User","site_admin":false},"repo":{"id":12338875,"name":"pyvisa","full_name":"hgrecco/pyvisa","owner":{"login":"hgrecco","id":278566,"avatar_url":"https://avatars.githubusercontent.com/u/278566?v=3","gravatar_id":"","url":"https://api.github.com/users/hgrecco","html_url":"https://github.com/hgrecco","followers_url":"https://api.github.com/users/hgrecco/followers","following_url":"https://api.github.com/users/hgrecco/following{/other_user}","gists_url":"https://api.github.com/users/hgrecco/gists{/gist_id}","starred_url":"https://api.github.com/users/hgrecco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgrecco/subscriptions","organizations_url":"https://api.github.com/users/hgrecco/orgs","repos_url":"https://api.github.com/users/hgrecco/repos","events_url":"https://api.github.com/users/hgrecco/events{/privacy}","received_events_url":"https://api.github.com/users/hgrecco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hgrecco/pyvisa","description":"A Python package with bindings to the \"Virtual Instrument Software Architecture\" VISA library, in order to control measurement devices and test equipment via GPIB, RS232, or USB.","fork":false,"url":"https://api.github.com/repos/hgrecco/pyvisa","forks_url":"https://api.github.com/repos/hgrecco/pyvisa/forks","keys_url":"https://api.github.com/repos/hgrecco/pyvisa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hgrecco/pyvisa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hgrecco/pyvisa/teams","hooks_url":"https://api.github.com/repos/hgrecco/pyvisa/hooks","issue_events_url":"https://api.github.com/repos/hgrecco/pyvisa/issues/events{/number}","events_url":"https://api.github.com/repos/hgrecco/pyvisa/events","assignees_url":"https://api.github.com/repos/hgrecco/pyvisa/assignees{/user}","branches_url":"https://api.github.com/repos/hgrecco/pyvisa/branches{/branch}","tags_url":"https://api.github.com/repos/hgrecco/pyvisa/tags","blobs_url":"https://api.github.com/repos/hgrecco/pyvisa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hgrecco/pyvisa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hgrecco/pyvisa/git/refs{/sha}","trees_url":"https://api.github.com/repos/hgrecco/pyvisa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hgrecco/pyvisa/statuses/{sha}","languages_url":"https://api.github.com/repos/hgrecco/pyvisa/languages","stargazers_url":"https://api.github.com/repos/hgrecco/pyvisa/stargazers","contributors_url":"https://api.github.com/repos/hgrecco/pyvisa/contributors","subscribers_url":"https://api.github.com/repos/hgrecco/pyvisa/subscribers","subscription_url":"https://api.github.com/repos/hgrecco/pyvisa/subscription","commits_url":"https://api.github.com/repos/hgrecco/pyvisa/commits{/sha}","git_commits_url":"https://api.github.com/repos/hgrecco/pyvisa/git/commits{/sha}","comments_url":"https://api.github.com/repos/hgrecco/pyvisa/comments{/number}","issue_comment_url":"https://api.github.com/repos/hgrecco/pyvisa/issues/comments{/number}","contents_url":"https://api.github.com/repos/hgrecco/pyvisa/contents/{+path}","compare_url":"https://api.github.com/repos/hgrecco/pyvisa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hgrecco/pyvisa/merges","archive_url":"https://api.github.com/repos/hgrecco/pyvisa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hgrecco/pyvisa/downloads","issues_url":"https://api.github.com/repos/hgrecco/pyvisa/issues{/number}","pulls_url":"https://api.github.com/repos/hgrecco/pyvisa/pulls{/number}","milestones_url":"https://api.github.com/repos/hgrecco/pyvisa/milestones{/number}","notifications_url":"https://api.github.com/repos/hgrecco/pyvisa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hgrecco/pyvisa/labels{/name}","releases_url":"https://api.github.com/repos/hgrecco/pyvisa/releases{/id}","created_at":"2013-08-24T05:47:15Z","updated_at":"2015-04-28T00:21:51Z","pushed_at":"2015-04-28T00:21:49Z","git_url":"git://github.com/hgrecco/pyvisa.git","ssh_url":"git@github.com:hgrecco/pyvisa.git","clone_url":"https://github.com/hgrecco/pyvisa.git","svn_url":"https://github.com/hgrecco/pyvisa","homepage":null,"size":2366,"stargazers_count":89,"watchers_count":89,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":12,"forks":56,"open_issues":12,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hgrecco/pyvisa/pulls/142"},"html":{"href":"https://github.com/hgrecco/pyvisa/pull/142"},"issue":{"href":"https://api.github.com/repos/hgrecco/pyvisa/issues/142"},"comments":{"href":"https://api.github.com/repos/hgrecco/pyvisa/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/hgrecco/pyvisa/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/hgrecco/pyvisa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hgrecco/pyvisa/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/hgrecco/pyvisa/statuses/958dfa620b8b566854f80652db2ec5e7e61a69fd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}