{"action":"created","comment":{"url":"https://api.github.com/repos/numba/numba/pulls/comments/29508163","id":29508163,"diff_hunk":"@@ -822,6 +822,17 @@ def key(self):\n         return self.dtype, self.ndim, self.layout, self.mutable\n \n \n+class ArrayCTypes(Type):\n+    def __init__(self, arytype):\n+        self.ndim = arytype.ndim","path":"numba/types.py","position":6,"original_position":6,"commit_id":"9c4debf7bc0eb0546198f5f6bff6b99986a70709","original_commit_id":"9c4debf7bc0eb0546198f5f6bff6b99986a70709","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":"It's for ndarray.ctypes.[strides|shape] which are `(c_intp * ndim)`.","created_at":"2015-05-01T15:27:18Z","updated_at":"2015-05-01T15:27:18Z","html_url":"https://github.com/numba/numba/pull/1108#discussion_r29508163","pull_request_url":"https://api.github.com/repos/numba/numba/pulls/1108","_links":{"self":{"href":"https://api.github.com/repos/numba/numba/pulls/comments/29508163"},"html":{"href":"https://github.com/numba/numba/pull/1108#discussion_r29508163"},"pull_request":{"href":"https://api.github.com/repos/numba/numba/pulls/1108"}}},"pull_request":{"url":"https://api.github.com/repos/numba/numba/pulls/1108","id":34489507,"html_url":"https://github.com/numba/numba/pull/1108","diff_url":"https://github.com/numba/numba/pull/1108.diff","patch_url":"https://github.com/numba/numba/pull/1108.patch","issue_url":"https://api.github.com/repos/numba/numba/issues/1108","number":1108,"state":"open","locked":false,"title":"Array ctypes data","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":"As a follow up to the discussion in https://groups.google.com/a/continuum.io/forum/?utm_medium=email&utm_source=footer#!msg/numba-users/b9E-S_heC-U/9jcGwygmhs4J\r\n\r\nWe want to expose ``ndarray.ctypes.data`` for consumption by a ctypes/cffi foreign function.\r\n\r\nSample usecase: https://gist.github.com/sklam/806244ed2dd6b89a2ca9\r\n\r\nNote: This does not implement the other attributes in `ndarray.ctypes` as they need introduce a entire set of types that would return as a ctypes object.  E.g. ``ndarray.ctypes.shape`` gives ``(c_long * ndim)``.","created_at":"2015-04-30T18:50:42Z","updated_at":"2015-05-01T15:27:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59ae9a194be8e316fda250c718b647fe86fda699","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numba/numba/pulls/1108/commits","review_comments_url":"https://api.github.com/repos/numba/numba/pulls/1108/comments","review_comment_url":"https://api.github.com/repos/numba/numba/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numba/numba/issues/1108/comments","statuses_url":"https://api.github.com/repos/numba/numba/statuses/9c4debf7bc0eb0546198f5f6bff6b99986a70709","head":{"label":"sklam:feature/array_ctypes_data","ref":"feature/array_ctypes_data","sha":"9c4debf7bc0eb0546198f5f6bff6b99986a70709","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-04-30T20:10:05Z","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":23996,"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":"1f2bdd6a96656407884992f571be122b73bb8b64","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-05-01T07:59:38Z","pushed_at":"2015-04-30T19:23:07Z","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":"","size":34156,"stargazers_count":1440,"watchers_count":1440,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":152,"mirror_url":null,"open_issues_count":152,"forks":152,"open_issues":152,"watchers":1440,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numba/numba/pulls/1108"},"html":{"href":"https://github.com/numba/numba/pull/1108"},"issue":{"href":"https://api.github.com/repos/numba/numba/issues/1108"},"comments":{"href":"https://api.github.com/repos/numba/numba/issues/1108/comments"},"review_comments":{"href":"https://api.github.com/repos/numba/numba/pulls/1108/comments"},"review_comment":{"href":"https://api.github.com/repos/numba/numba/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numba/numba/pulls/1108/commits"},"statuses":{"href":"https://api.github.com/repos/numba/numba/statuses/9c4debf7bc0eb0546198f5f6bff6b99986a70709"}}}}