{"action":"created","comment":{"url":"https://api.github.com/repos/dask/dask/pulls/comments/188291401","pull_request_review_id":120238493,"id":188291401,"diff_hunk":"@@ -3231,3 +3231,89 @@ def test_meta(dtype):\n     assert a._meta.dtype == a.dtype\n     assert isinstance(a._meta, np.ndarray)\n     assert a.nbytes < 1000\n+\n+\n+def test_zarr_roundtrip():\n+    pytest.importorskip('zarr')\n+    with tmpdir() as d:\n+        a = da.zeros((3, 3), chunks=(1, 1))\n+        a.to_zarr(d)\n+        a2 = da.from_zarr(d)\n+        assert_eq(a, a2)\n+        assert a2.chunks == a.chunks\n+\n+\n+def test_zarr_rechunk():\n+    pytest.importorskip('zarr')\n+    a = da.zeros((3, ), chunks=((1, 2), ))\n+    with tmpdir() as d:\n+        with pytest.raises(ValueError):\n+            a.to_zarr(d)\n+        a.to_zarr(d, rechunk=(1, ))\n+\n+\n+def test_read_zarr_chunks():\n+    pytest.importorskip('zarr')\n+    a = da.zeros((9, ), chunks=(3, ))\n+    with tmpdir() as d:\n+        a.to_zarr(d)\n+        arr = da.from_zarr(d, chunks=(5, ))\n+        assert arr.chunks == ((5, 4), )","path":"dask/array/tests/test_array_core.py","position":31,"original_position":31,"commit_id":"ea16f7f0ffb2a491d6f142bb648b7f296cd4d293","original_commit_id":"ea16f7f0ffb2a491d6f142bb648b7f296cd4d293","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":"The last chunk can always be smaller, this is fine. The only time this could conceivably be an issue is if concatenating along that axis.","created_at":"2018-05-15T13:42:56Z","updated_at":"2018-05-15T13:42:56Z","html_url":"https://github.com/dask/dask/pull/3460#discussion_r188291401","pull_request_url":"https://api.github.com/repos/dask/dask/pulls/3460","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dask/dask/pulls/comments/188291401"},"html":{"href":"https://github.com/dask/dask/pull/3460#discussion_r188291401"},"pull_request":{"href":"https://api.github.com/repos/dask/dask/pulls/3460"}},"in_reply_to_id":188261982},"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-15T13:42:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d413745f84bd904936b710c36886dd958c3c53ab","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/ea16f7f0ffb2a491d6f142bb648b7f296cd4d293","head":{"label":"martindurant:zarr","ref":"zarr","sha":"ea16f7f0ffb2a491d6f142bb648b7f296cd4d293","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-15T13:37:12Z","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":16854,"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":"7c419580037f552befc2650cb13967dd6bdef86a","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-15T12:20:14Z","pushed_at":"2018-05-15T13:37:14Z","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":16712,"stargazers_count":2834,"watchers_count":2834,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":481,"mirror_url":null,"archived":false,"open_issues_count":427,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":481,"open_issues":427,"watchers":2834,"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/ea16f7f0ffb2a491d6f142bb648b7f296cd4d293"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"martindurant"}}