{"action":"created","comment":{"url":"https://api.github.com/repos/dask/dask/pulls/comments/186936165","pull_request_review_id":118613483,"id":186936165,"diff_hunk":"@@ -2096,6 +2106,45 @@ def to_zarr(arr, url, component=None, storage_options=None,\n     return store(arr, z, compute=compute, return_stored=return_stored)\n \n \n+def _check_regular_chunks(chunkset):\n+    \"\"\"Check if the chunks are regular\n+\n+    \"Regular\" in this context means that along every axis, the chunks all\n+    have the same size, except the last one, which may be smaller\n+\n+    Parameters\n+    ----------\n+    chunkset: tuple of tuples of ints\n+        From the ``.chunks`` attribute of an ``Array``\n+\n+    Returns\n+    -------\n+    True if chunkset passes, else False\n+\n+    Examples\n+    --------\n+    >>> arr = da.zeros(10, chunks=(5, ))\n+    >>> _check_regular_chunks(arr.chunks)\n+    True\n+\n+    >>> arr = da.zeros(10, chunks=((3, 3, 3, 1), ))\n+    >>> _check_regular_chunks(arr.chunks)\n+    True\n+\n+    >>> arr = da.zeros(10, chunks=((3, 1, 3, 3), ))\n+    >>> _check_regular_chunks(arr.chunks)\n+    False\n+    \"\"\"\n+    for chunks in chunkset:\n+        if len(chunks) < 2:","path":"dask/array/core.py","position":146,"original_position":66,"commit_id":"ea53c35796aef68134e91de76b2ed44a814a2966","original_commit_id":"591974caacb35908fdd9cf610f1abebe4f4e0fd2","user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"body":"Minor point: From a readability perspective `== 1` is a bit clearer.","created_at":"2018-05-09T05:48:37Z","updated_at":"2018-05-09T05:48:37Z","html_url":"https://github.com/dask/dask/pull/3460#discussion_r186936165","pull_request_url":"https://api.github.com/repos/dask/dask/pulls/3460","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/dask/dask/pulls/comments/186936165"},"html":{"href":"https://github.com/dask/dask/pull/3460#discussion_r186936165"},"pull_request":{"href":"https://api.github.com/repos/dask/dask/pulls/3460"}}},"pull_request":{"url":"https://api.github.com/repos/dask/dask/pulls/3460","id":185533249,"html_url":"https://github.com/dask/dask/pull/3460","diff_url":"https://github.com/dask/dask/pull/3460.diff","patch_url":"https://github.com/dask/dask/pull/3460.patch","issue_url":"https://api.github.com/repos/dask/dask/issues/3460","number":3460,"state":"open","locked":false,"title":"add to/read_zarr","user":{"login":"martindurant","id":6042212,"avatar_url":"https://avatars1.githubusercontent.com/u/6042212?v=4","gravatar_id":"","url":"https://api.github.com/users/martindurant","html_url":"https://github.com/martindurant","followers_url":"https://api.github.com/users/martindurant/followers","following_url":"https://api.github.com/users/martindurant/following{/other_user}","gists_url":"https://api.github.com/users/martindurant/gists{/gist_id}","starred_url":"https://api.github.com/users/martindurant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindurant/subscriptions","organizations_url":"https://api.github.com/users/martindurant/orgs","repos_url":"https://api.github.com/users/martindurant/repos","events_url":"https://api.github.com/users/martindurant/events{/privacy}","received_events_url":"https://api.github.com/users/martindurant/received_events","type":"User","site_admin":false},"body":"- [x] Tests added / passed\r\n- [x] Passes `flake8 dask`\r\n","created_at":"2018-05-02T19:09:06Z","updated_at":"2018-05-09T05:48:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a996fb3493b13f7e474575c8c46024d84a99b84a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dask/dask/pulls/3460/commits","review_comments_url":"https://api.github.com/repos/dask/dask/pulls/3460/comments","review_comment_url":"https://api.github.com/repos/dask/dask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dask/dask/issues/3460/comments","statuses_url":"https://api.github.com/repos/dask/dask/statuses/ea53c35796aef68134e91de76b2ed44a814a2966","head":{"label":"martindurant:zarr","ref":"zarr","sha":"ea53c35796aef68134e91de76b2ed44a814a2966","user":{"login":"martindurant","id":6042212,"avatar_url":"https://avatars1.githubusercontent.com/u/6042212?v=4","gravatar_id":"","url":"https://api.github.com/users/martindurant","html_url":"https://github.com/martindurant","followers_url":"https://api.github.com/users/martindurant/followers","following_url":"https://api.github.com/users/martindurant/following{/other_user}","gists_url":"https://api.github.com/users/martindurant/gists{/gist_id}","starred_url":"https://api.github.com/users/martindurant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindurant/subscriptions","organizations_url":"https://api.github.com/users/martindurant/orgs","repos_url":"https://api.github.com/users/martindurant/repos","events_url":"https://api.github.com/users/martindurant/events{/privacy}","received_events_url":"https://api.github.com/users/martindurant/received_events","type":"User","site_admin":false},"repo":{"id":59704001,"name":"dask","full_name":"martindurant/dask","owner":{"login":"martindurant","id":6042212,"avatar_url":"https://avatars1.githubusercontent.com/u/6042212?v=4","gravatar_id":"","url":"https://api.github.com/users/martindurant","html_url":"https://github.com/martindurant","followers_url":"https://api.github.com/users/martindurant/followers","following_url":"https://api.github.com/users/martindurant/following{/other_user}","gists_url":"https://api.github.com/users/martindurant/gists{/gist_id}","starred_url":"https://api.github.com/users/martindurant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindurant/subscriptions","organizations_url":"https://api.github.com/users/martindurant/orgs","repos_url":"https://api.github.com/users/martindurant/repos","events_url":"https://api.github.com/users/martindurant/events{/privacy}","received_events_url":"https://api.github.com/users/martindurant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martindurant/dask","description":"Versatile parallel programming with task scheduling","fork":true,"url":"https://api.github.com/repos/martindurant/dask","forks_url":"https://api.github.com/repos/martindurant/dask/forks","keys_url":"https://api.github.com/repos/martindurant/dask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martindurant/dask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martindurant/dask/teams","hooks_url":"https://api.github.com/repos/martindurant/dask/hooks","issue_events_url":"https://api.github.com/repos/martindurant/dask/issues/events{/number}","events_url":"https://api.github.com/repos/martindurant/dask/events","assignees_url":"https://api.github.com/repos/martindurant/dask/assignees{/user}","branches_url":"https://api.github.com/repos/martindurant/dask/branches{/branch}","tags_url":"https://api.github.com/repos/martindurant/dask/tags","blobs_url":"https://api.github.com/repos/martindurant/dask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martindurant/dask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martindurant/dask/git/refs{/sha}","trees_url":"https://api.github.com/repos/martindurant/dask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martindurant/dask/statuses/{sha}","languages_url":"https://api.github.com/repos/martindurant/dask/languages","stargazers_url":"https://api.github.com/repos/martindurant/dask/stargazers","contributors_url":"https://api.github.com/repos/martindurant/dask/contributors","subscribers_url":"https://api.github.com/repos/martindurant/dask/subscribers","subscription_url":"https://api.github.com/repos/martindurant/dask/subscription","commits_url":"https://api.github.com/repos/martindurant/dask/commits{/sha}","git_commits_url":"https://api.github.com/repos/martindurant/dask/git/commits{/sha}","comments_url":"https://api.github.com/repos/martindurant/dask/comments{/number}","issue_comment_url":"https://api.github.com/repos/martindurant/dask/issues/comments{/number}","contents_url":"https://api.github.com/repos/martindurant/dask/contents/{+path}","compare_url":"https://api.github.com/repos/martindurant/dask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martindurant/dask/merges","archive_url":"https://api.github.com/repos/martindurant/dask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martindurant/dask/downloads","issues_url":"https://api.github.com/repos/martindurant/dask/issues{/number}","pulls_url":"https://api.github.com/repos/martindurant/dask/pulls{/number}","milestones_url":"https://api.github.com/repos/martindurant/dask/milestones{/number}","notifications_url":"https://api.github.com/repos/martindurant/dask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martindurant/dask/labels{/name}","releases_url":"https://api.github.com/repos/martindurant/dask/releases{/id}","deployments_url":"https://api.github.com/repos/martindurant/dask/deployments","created_at":"2016-05-25T23:14:24Z","updated_at":"2016-05-25T23:14:25Z","pushed_at":"2018-05-07T14:41:27Z","git_url":"git://github.com/martindurant/dask.git","ssh_url":"git@github.com:martindurant/dask.git","clone_url":"https://github.com/martindurant/dask.git","svn_url":"https://github.com/martindurant/dask","homepage":"http://dask.pydata.org","size":16625,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dask:master","ref":"master","sha":"f6c8a9c6304bb431d8e76c82efab9ea46a40138a","user":{"login":"dask","id":17131925,"avatar_url":"https://avatars1.githubusercontent.com/u/17131925?v=4","gravatar_id":"","url":"https://api.github.com/users/dask","html_url":"https://github.com/dask","followers_url":"https://api.github.com/users/dask/followers","following_url":"https://api.github.com/users/dask/following{/other_user}","gists_url":"https://api.github.com/users/dask/gists{/gist_id}","starred_url":"https://api.github.com/users/dask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dask/subscriptions","organizations_url":"https://api.github.com/users/dask/orgs","repos_url":"https://api.github.com/users/dask/repos","events_url":"https://api.github.com/users/dask/events{/privacy}","received_events_url":"https://api.github.com/users/dask/received_events","type":"Organization","site_admin":false},"repo":{"id":28782747,"name":"dask","full_name":"dask/dask","owner":{"login":"dask","id":17131925,"avatar_url":"https://avatars1.githubusercontent.com/u/17131925?v=4","gravatar_id":"","url":"https://api.github.com/users/dask","html_url":"https://github.com/dask","followers_url":"https://api.github.com/users/dask/followers","following_url":"https://api.github.com/users/dask/following{/other_user}","gists_url":"https://api.github.com/users/dask/gists{/gist_id}","starred_url":"https://api.github.com/users/dask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dask/subscriptions","organizations_url":"https://api.github.com/users/dask/orgs","repos_url":"https://api.github.com/users/dask/repos","events_url":"https://api.github.com/users/dask/events{/privacy}","received_events_url":"https://api.github.com/users/dask/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dask/dask","description":"Parallel computing with task scheduling","fork":false,"url":"https://api.github.com/repos/dask/dask","forks_url":"https://api.github.com/repos/dask/dask/forks","keys_url":"https://api.github.com/repos/dask/dask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dask/dask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dask/dask/teams","hooks_url":"https://api.github.com/repos/dask/dask/hooks","issue_events_url":"https://api.github.com/repos/dask/dask/issues/events{/number}","events_url":"https://api.github.com/repos/dask/dask/events","assignees_url":"https://api.github.com/repos/dask/dask/assignees{/user}","branches_url":"https://api.github.com/repos/dask/dask/branches{/branch}","tags_url":"https://api.github.com/repos/dask/dask/tags","blobs_url":"https://api.github.com/repos/dask/dask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dask/dask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dask/dask/git/refs{/sha}","trees_url":"https://api.github.com/repos/dask/dask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dask/dask/statuses/{sha}","languages_url":"https://api.github.com/repos/dask/dask/languages","stargazers_url":"https://api.github.com/repos/dask/dask/stargazers","contributors_url":"https://api.github.com/repos/dask/dask/contributors","subscribers_url":"https://api.github.com/repos/dask/dask/subscribers","subscription_url":"https://api.github.com/repos/dask/dask/subscription","commits_url":"https://api.github.com/repos/dask/dask/commits{/sha}","git_commits_url":"https://api.github.com/repos/dask/dask/git/commits{/sha}","comments_url":"https://api.github.com/repos/dask/dask/comments{/number}","issue_comment_url":"https://api.github.com/repos/dask/dask/issues/comments{/number}","contents_url":"https://api.github.com/repos/dask/dask/contents/{+path}","compare_url":"https://api.github.com/repos/dask/dask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dask/dask/merges","archive_url":"https://api.github.com/repos/dask/dask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dask/dask/downloads","issues_url":"https://api.github.com/repos/dask/dask/issues{/number}","pulls_url":"https://api.github.com/repos/dask/dask/pulls{/number}","milestones_url":"https://api.github.com/repos/dask/dask/milestones{/number}","notifications_url":"https://api.github.com/repos/dask/dask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dask/dask/labels{/name}","releases_url":"https://api.github.com/repos/dask/dask/releases{/id}","deployments_url":"https://api.github.com/repos/dask/dask/deployments","created_at":"2015-01-04T18:50:00Z","updated_at":"2018-05-08T14:05:59Z","pushed_at":"2018-05-09T05:29:37Z","git_url":"git://github.com/dask/dask.git","ssh_url":"git@github.com:dask/dask.git","clone_url":"https://github.com/dask/dask.git","svn_url":"https://github.com/dask/dask","homepage":"http://dask.pydata.org","size":16697,"stargazers_count":2800,"watchers_count":2800,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":474,"mirror_url":null,"archived":false,"open_issues_count":419,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":474,"open_issues":419,"watchers":2800,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dask/dask/pulls/3460"},"html":{"href":"https://github.com/dask/dask/pull/3460"},"issue":{"href":"https://api.github.com/repos/dask/dask/issues/3460"},"comments":{"href":"https://api.github.com/repos/dask/dask/issues/3460/comments"},"review_comments":{"href":"https://api.github.com/repos/dask/dask/pulls/3460/comments"},"review_comment":{"href":"https://api.github.com/repos/dask/dask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dask/dask/pulls/3460/commits"},"statuses":{"href":"https://api.github.com/repos/dask/dask/statuses/ea53c35796aef68134e91de76b2ed44a814a2966"}},"author_association":"OWNER"}}
{"actor":{"display_login":"jakirkham"}}