payload: {"action":"created","comment":{"url":"https://api.github.com/repos/analysiscenter/batchflow/pulls/comments/269980594","pull_request_review_id":219992990,"id":269980594,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2OTk4MDU5NA==","diff_hunk":"@@ -493,22 +494,73 @@ def apply_transform(self, ix, func, *args, src=None, dst=None, p=None, use_self=\n \n             for item in range(len(batch)):\n                 self.dst[item] = func(self.src[item], *args, **kwargs)\n+\n+        If `src` is a list with two or more elements, `dst` should be list or\n+        tuple of the same lenght.\n+\n+        Examples\n+        --------\n+\n+        ::\n+\n+            apply_transform(make_masks_fn, src='images', dst='masks')\n+            apply_transform(apply_mask, src=('images', 'masks'), dst='images', use_self=True)\n+            apply_transform_all(rotate, src=['images', 'masks'], dst=['images', 'masks'], p=.2)\n         \"\"\"\n+        to_act = bool(p is None or np.random.binomial(1, p))","path":"batchflow/batch.py","position":null,"original_position":64,"commit_id":"c7641d63bc6fe953778fd980c676943e127dd72b","original_commit_id":"7e76e6ee8488225be4ce934695897275f23df145","user":{"login":"dpodvyaznikov","id":26137806,"node_id":"MDQ6VXNlcjI2MTM3ODA2","avatar_url":"https://avatars1.githubusercontent.com/u/26137806?v=4","gravatar_id":"","url":"https://api.github.com/users/dpodvyaznikov","html_url":"https://github.com/dpodvyaznikov","followers_url":"https://api.github.com/users/dpodvyaznikov/followers","following_url":"https://api.github.com/users/dpodvyaznikov/following{/other_user}","gists_url":"https://api.github.com/users/dpodvyaznikov/gists{/gist_id}","starred_url":"https://api.github.com/users/dpodvyaznikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpodvyaznikov/subscriptions","organizations_url":"https://api.github.com/users/dpodvyaznikov/orgs","repos_url":"https://api.github.com/users/dpodvyaznikov/repos","events_url":"https://api.github.com/users/dpodvyaznikov/events{/privacy}","received_events_url":"https://api.github.com/users/dpodvyaznikov/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2019-03-28T12:40:34Z","updated_at":"2019-03-28T12:40:34Z","html_url":"https://github.com/analysiscenter/batchflow/pull/297#discussion_r269980594","pull_request_url":"https://api.github.com/repos/analysiscenter/batchflow/pulls/297","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/analysiscenter/batchflow/pulls/comments/269980594"},"html":{"href":"https://github.com/analysiscenter/batchflow/pull/297#discussion_r269980594"},"pull_request":{"href":"https://api.github.com/repos/analysiscenter/batchflow/pulls/297"}},"in_reply_to_id":269413366},"pull_request":{"url":"https://api.github.com/repos/analysiscenter/batchflow/pulls/297","id":262028575,"node_id":"MDExOlB1bGxSZXF1ZXN0MjYyMDI4NTc1","html_url":"https://github.com/analysiscenter/batchflow/pull/297","diff_url":"https://github.com/analysiscenter/batchflow/pull/297.diff","patch_url":"https://github.com/analysiscenter/batchflow/pull/297.patch","issue_url":"https://api.github.com/repos/analysiscenter/batchflow/issues/297","number":297,"state":"open","locked":false,"title":"Modify apply transform","user":{"login":"dpodvyaznikov","id":26137806,"node_id":"MDQ6VXNlcjI2MTM3ODA2","avatar_url":"https://avatars1.githubusercontent.com/u/26137806?v=4","gravatar_id":"","url":"https://api.github.com/users/dpodvyaznikov","html_url":"https://github.com/dpodvyaznikov","followers_url":"https://api.github.com/users/dpodvyaznikov/followers","following_url":"https://api.github.com/users/dpodvyaznikov/following{/other_user}","gists_url":"https://api.github.com/users/dpodvyaznikov/gists{/gist_id}","starred_url":"https://api.github.com/users/dpodvyaznikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpodvyaznikov/subscriptions","organizations_url":"https://api.github.com/users/dpodvyaznikov/orgs","repos_url":"https://api.github.com/users/dpodvyaznikov/repos","events_url":"https://api.github.com/users/dpodvyaznikov/events{/privacy}","received_events_url":"https://api.github.com/users/dpodvyaznikov/received_events","type":"User","site_admin":false},"body":"Now if `src` argument of `apply_transform`  is a list, it applies func to each element of `src` identically and independently.","created_at":"2019-03-18T12:08:19Z","updated_at":"2019-03-28T12:40:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9f09f387b6b74347cbfa1a8cb5da977c4a8ae5b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/analysiscenter/batchflow/pulls/297/commits","review_comments_url":"https://api.github.com/repos/analysiscenter/batchflow/pulls/297/comments","review_comment_url":"https://api.github.com/repos/analysiscenter/batchflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/analysiscenter/batchflow/issues/297/comments","statuses_url":"https://api.github.com/repos/analysiscenter/batchflow/statuses/c7641d63bc6fe953778fd980c676943e127dd72b","head":{"label":"analysiscenter:modify_apply_transform","ref":"modify_apply_transform","sha":"c7641d63bc6fe953778fd980c676943e127dd72b","user":{"login":"analysiscenter","id":23120136,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTIwMTM2","avatar_url":"https://avatars0.githubusercontent.com/u/23120136?v=4","gravatar_id":"","url":"https://api.github.com/users/analysiscenter","html_url":"https://github.com/analysiscenter","followers_url":"https://api.github.com/users/analysiscenter/followers","following_url":"https://api.github.com/users/analysiscenter/following{/other_user}","gists_url":"https://api.github.com/users/analysiscenter/gists{/gist_id}","starred_url":"https://api.github.com/users/analysiscenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/analysiscenter/subscriptions","organizations_url":"https://api.github.com/users/analysiscenter/orgs","repos_url":"https://api.github.com/users/analysiscenter/repos","events_url":"https://api.github.com/users/analysiscenter/events{/privacy}","received_events_url":"https://api.github.com/users/analysiscenter/received_events","type":"Organization","site_admin":false},"repo":{"id":84835419,"node_id":"MDEwOlJlcG9zaXRvcnk4NDgzNTQxOQ==","name":"batchflow","full_name":"analysiscenter/batchflow","private":false,"owner":{"login":"analysiscenter","id":23120136,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTIwMTM2","avatar_url":"https://avatars0.githubusercontent.com/u/23120136?v=4","gravatar_id":"","url":"https://api.github.com/users/analysiscenter","html_url":"https://github.com/analysiscenter","followers_url":"https://api.github.com/users/analysiscenter/followers","following_url":"https://api.github.com/users/analysiscenter/following{/other_user}","gists_url":"https://api.github.com/users/analysiscenter/gists{/gist_id}","starred_url":"https://api.github.com/users/analysiscenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/analysiscenter/subscriptions","organizations_url":"https://api.github.com/users/analysiscenter/orgs","repos_url":"https://api.github.com/users/analysiscenter/repos","events_url":"https://api.github.com/users/analysiscenter/events{/privacy}","received_events_url":"https://api.github.com/users/analysiscenter/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/analysiscenter/batchflow","description":"BatchFlow helps you conveniently work with random or sequential batches of your data and define data processing and machine learning workflows even for datasets that do not fit into memory.","fork":false,"url":"https://api.github.com/repos/analysiscenter/batchflow","forks_url":"https://api.github.com/repos/analysiscenter/batchflow/forks","keys_url":"https://api.github.com/repos/analysiscenter/batchflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/analysiscenter/batchflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/analysiscenter/batchflow/teams","hooks_url":"https://api.github.com/repos/analysiscenter/batchflow/hooks","issue_events_url":"https://api.github.com/repos/analysiscenter/batchflow/issues/events{/number}","events_url":"https://api.github.com/repos/analysiscenter/batchflow/events","assignees_url":"https://api.github.com/repos/analysiscenter/batchflow/assignees{/user}","branches_url":"https://api.github.com/repos/analysiscenter/batchflow/branches{/branch}","tags_url":"https://api.github.com/repos/analysiscenter/batchflow/tags","blobs_url":"https://api.github.com/repos/analysiscenter/batchflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/analysiscenter/batchflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/analysiscenter/batchflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/analysiscenter/batchflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/analysiscenter/batchflow/statuses/{sha}","languages_url":"https://api.github.com/repos/analysiscenter/batchflow/languages","stargazers_url":"https://api.github.com/repos/analysiscenter/batchflow/stargazers","contributors_url":"https://api.github.com/repos/analysiscenter/batchflow/contributors","subscribers_url":"https://api.github.com/repos/analysiscenter/batchflow/subscribers","subscription_url":"https://api.github.com/repos/analysiscenter/batchflow/subscription","commits_url":"https://api.github.com/repos/analysiscenter/batchflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/analysiscenter/batchflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/analysiscenter/batchflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/analysiscenter/batchflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/analysiscenter/batchflow/contents/{+path}","compare_url":"https://api.github.com/repos/analysiscenter/batchflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/analysiscenter/batchflow/merges","archive_url":"https://api.github.com/repos/analysiscenter/batchflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/analysiscenter/batchflow/downloads","issues_url":"https://api.github.com/repos/analysiscenter/batchflow/issues{/number}","pulls_url":"https://api.github.com/repos/analysiscenter/batchflow/pulls{/number}","milestones_url":"https://api.github.com/repos/analysiscenter/batchflow/milestones{/number}","notifications_url":"https://api.github.com/repos/analysiscenter/batchflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/analysiscenter/batchflow/labels{/name}","releases_url":"https://api.github.com/repos/analysiscenter/batchflow/releases{/id}","deployments_url":"https://api.github.com/repos/analysiscenter/batchflow/deployments","created_at":"2017-03-13T14:22:53Z","updated_at":"2019-03-27T19:38:18Z","pushed_at":"2019-03-27T13:27:07Z","git_url":"git://github.com/analysiscenter/batchflow.git","ssh_url":"git@github.com:analysiscenter/batchflow.git","clone_url":"https://github.com/analysiscenter/batchflow.git","svn_url":"https://github.com/analysiscenter/batchflow","homepage":"https://analysiscenter.github.io/batchflow/","size":35748,"stargazers_count":100,"watchers_count":100,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":26,"open_issues":13,"watchers":100,"default_branch":"master"}},"base":{"label":"analysiscenter:master","ref":"master","sha":"6fc596e07309dd9ec5f037ea1fa1e4695a916e76","user":{"login":"analysiscenter","id":23120136,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTIwMTM2","avatar_url":"https://avatars0.githubusercontent.com/u/23120136?v=4","gravatar_id":"","url":"https://api.github.com/users/analysiscenter","html_url":"https://github.com/analysiscenter","followers_url":"https://api.github.com/users/analysiscenter/followers","following_url":"https://api.github.com/users/analysiscenter/following{/other_user}","gists_url":"https://api.github.com/users/analysiscenter/gists{/gist_id}","starred_url":"https://api.github.com/users/analysiscenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/analysiscenter/subscriptions","organizations_url":"https://api.github.com/users/analysiscenter/orgs","repos_url":"https://api.github.com/users/analysiscenter/repos","events_url":"https://api.github.com/users/analysiscenter/events{/privacy}","received_events_url":"https://api.github.com/users/analysiscenter/received_events","type":"Organization","site_admin":false},"repo":{"id":84835419,"node_id":"MDEwOlJlcG9zaXRvcnk4NDgzNTQxOQ==","name":"batchflow","full_name":"analysiscenter/batchflow","private":false,"owner":{"login":"analysiscenter","id":23120136,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTIwMTM2","avatar_url":"https://avatars0.githubusercontent.com/u/23120136?v=4","gravatar_id":"","url":"https://api.github.com/users/analysiscenter","html_url":"https://github.com/analysiscenter","followers_url":"https://api.github.com/users/analysiscenter/followers","following_url":"https://api.github.com/users/analysiscenter/following{/other_user}","gists_url":"https://api.github.com/users/analysiscenter/gists{/gist_id}","starred_url":"https://api.github.com/users/analysiscenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/analysiscenter/subscriptions","organizations_url":"https://api.github.com/users/analysiscenter/orgs","repos_url":"https://api.github.com/users/analysiscenter/repos","events_url":"https://api.github.com/users/analysiscenter/events{/privacy}","received_events_url":"https://api.github.com/users/analysiscenter/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/analysiscenter/batchflow","description":"BatchFlow helps you conveniently work with random or sequential batches of your data and define data processing and machine learning workflows even for datasets that do not fit into memory.","fork":false,"url":"https://api.github.com/repos/analysiscenter/batchflow","forks_url":"https://api.github.com/repos/analysiscenter/batchflow/forks","keys_url":"https://api.github.com/repos/analysiscenter/batchflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/analysiscenter/batchflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/analysiscenter/batchflow/teams","hooks_url":"https://api.github.com/repos/analysiscenter/batchflow/hooks","issue_events_url":"https://api.github.com/repos/analysiscenter/batchflow/issues/events{/number}","events_url":"https://api.github.com/repos/analysiscenter/batchflow/events","assignees_url":"https://api.github.com/repos/analysiscenter/batchflow/assignees{/user}","branches_url":"https://api.github.com/repos/analysiscenter/batchflow/branches{/branch}","tags_url":"https://api.github.com/repos/analysiscenter/batchflow/tags","blobs_url":"https://api.github.com/repos/analysiscenter/batchflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/analysiscenter/batchflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/analysiscenter/batchflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/analysiscenter/batchflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/analysiscenter/batchflow/statuses/{sha}","languages_url":"https://api.github.com/repos/analysiscenter/batchflow/languages","stargazers_url":"https://api.github.com/repos/analysiscenter/batchflow/stargazers","contributors_url":"https://api.github.com/repos/analysiscenter/batchflow/contributors","subscribers_url":"https://api.github.com/repos/analysiscenter/batchflow/subscribers","subscription_url":"https://api.github.com/repos/analysiscenter/batchflow/subscription","commits_url":"https://api.github.com/repos/analysiscenter/batchflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/analysiscenter/batchflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/analysiscenter/batchflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/analysiscenter/batchflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/analysiscenter/batchflow/contents/{+path}","compare_url":"https://api.github.com/repos/analysiscenter/batchflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/analysiscenter/batchflow/merges","archive_url":"https://api.github.com/repos/analysiscenter/batchflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/analysiscenter/batchflow/downloads","issues_url":"https://api.github.com/repos/analysiscenter/batchflow/issues{/number}","pulls_url":"https://api.github.com/repos/analysiscenter/batchflow/pulls{/number}","milestones_url":"https://api.github.com/repos/analysiscenter/batchflow/milestones{/number}","notifications_url":"https://api.github.com/repos/analysiscenter/batchflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/analysiscenter/batchflow/labels{/name}","releases_url":"https://api.github.com/repos/analysiscenter/batchflow/releases{/id}","deployments_url":"https://api.github.com/repos/analysiscenter/batchflow/deployments","created_at":"2017-03-13T14:22:53Z","updated_at":"2019-03-27T19:38:18Z","pushed_at":"2019-03-27T13:27:07Z","git_url":"git://github.com/analysiscenter/batchflow.git","ssh_url":"git@github.com:analysiscenter/batchflow.git","clone_url":"https://github.com/analysiscenter/batchflow.git","svn_url":"https://github.com/analysiscenter/batchflow","homepage":"https://analysiscenter.github.io/batchflow/","size":35748,"stargazers_count":100,"watchers_count":100,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":26,"open_issues":13,"watchers":100,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/analysiscenter/batchflow/pulls/297"},"html":{"href":"https://github.com/analysiscenter/batchflow/pull/297"},"issue":{"href":"https://api.github.com/repos/analysiscenter/batchflow/issues/297"},"comments":{"href":"https://api.github.com/repos/analysiscenter/batchflow/issues/297/comments"},"review_comments":{"href":"https://api.github.com/repos/analysiscenter/batchflow/pulls/297/comments"},"review_comment":{"href":"https://api.github.com/repos/analysiscenter/batchflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/analysiscenter/batchflow/pulls/297/commits"},"statuses":{"href":"https://api.github.com/repos/analysiscenter/batchflow/statuses/c7641d63bc6fe953778fd980c676943e127dd72b"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"dpodvyaznikov"}}