{"action":"created","issue":{"url":"https://api.github.com/repos/nortikin/sverchok/issues/863","repository_url":"https://api.github.com/repos/nortikin/sverchok","labels_url":"https://api.github.com/repos/nortikin/sverchok/issues/863/labels{/name}","comments_url":"https://api.github.com/repos/nortikin/sverchok/issues/863/comments","events_url":"https://api.github.com/repos/nortikin/sverchok/issues/863/events","html_url":"https://github.com/nortikin/sverchok/issues/863","id":175198360,"number":863,"title":"Vectorize Input option in monads/node groups","user":{"login":"ly29","id":6241382,"avatar_url":"https://avatars.githubusercontent.com/u/6241382?v=3","gravatar_id":"","url":"https://api.github.com/users/ly29","html_url":"https://github.com/ly29","followers_url":"https://api.github.com/users/ly29/followers","following_url":"https://api.github.com/users/ly29/following{/other_user}","gists_url":"https://api.github.com/users/ly29/gists{/gist_id}","starred_url":"https://api.github.com/users/ly29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ly29/subscriptions","organizations_url":"https://api.github.com/users/ly29/orgs","repos_url":"https://api.github.com/users/ly29/repos","events_url":"https://api.github.com/users/ly29/events{/privacy}","received_events_url":"https://api.github.com/users/ly29/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"enzyme69","id":3952687,"avatar_url":"https://avatars.githubusercontent.com/u/3952687?v=3","gravatar_id":"","url":"https://api.github.com/users/enzyme69","html_url":"https://github.com/enzyme69","followers_url":"https://api.github.com/users/enzyme69/followers","following_url":"https://api.github.com/users/enzyme69/following{/other_user}","gists_url":"https://api.github.com/users/enzyme69/gists{/gist_id}","starred_url":"https://api.github.com/users/enzyme69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enzyme69/subscriptions","organizations_url":"https://api.github.com/users/enzyme69/orgs","repos_url":"https://api.github.com/users/enzyme69/repos","events_url":"https://api.github.com/users/enzyme69/events{/privacy}","received_events_url":"https://api.github.com/users/enzyme69/received_events","type":"User","site_admin":false},"assignees":[{"login":"enzyme69","id":3952687,"avatar_url":"https://avatars.githubusercontent.com/u/3952687?v=3","gravatar_id":"","url":"https://api.github.com/users/enzyme69","html_url":"https://github.com/enzyme69","followers_url":"https://api.github.com/users/enzyme69/followers","following_url":"https://api.github.com/users/enzyme69/following{/other_user}","gists_url":"https://api.github.com/users/enzyme69/gists{/gist_id}","starred_url":"https://api.github.com/users/enzyme69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enzyme69/subscriptions","organizations_url":"https://api.github.com/users/enzyme69/orgs","repos_url":"https://api.github.com/users/enzyme69/repos","events_url":"https://api.github.com/users/enzyme69/events{/privacy}","received_events_url":"https://api.github.com/users/enzyme69/received_events","type":"User","site_admin":false},{"login":"ly29","id":6241382,"avatar_url":"https://avatars.githubusercontent.com/u/6241382?v=3","gravatar_id":"","url":"https://api.github.com/users/ly29","html_url":"https://github.com/ly29","followers_url":"https://api.github.com/users/ly29/followers","following_url":"https://api.github.com/users/ly29/following{/other_user}","gists_url":"https://api.github.com/users/ly29/gists{/gist_id}","starred_url":"https://api.github.com/users/ly29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ly29/subscriptions","organizations_url":"https://api.github.com/users/ly29/orgs","repos_url":"https://api.github.com/users/ly29/repos","events_url":"https://api.github.com/users/ly29/events{/privacy}","received_events_url":"https://api.github.com/users/ly29/received_events","type":"User","site_admin":false}],"milestone":null,"comments":94,"created_at":"2016-09-06T09:15:48Z","updated_at":"2016-09-10T07:58:57Z","closed_at":null,"body":"![skarmavbild 2016-09-06 kl 12 17 08](https://cloud.githubusercontent.com/assets/6241382/18270161/df537c64-742b-11e6-9bca-d88d3923d790.png)\r\n\r\n\r\nSince we have many nodes that needs be vectorized and some that can't be easily done without redoing a lot (like 80-90% of nodes). I now introduce a simple option for apply a node group/monad to the input.\r\n\r\nThis calls the monad on the level 1 input wrapped as separate objects, and the output is extended on the same level not appended and preserving structure. \r\n\r\n\r\n![skarmavbild 2016-09-06 kl 11 15 08](https://cloud.githubusercontent.com/assets/6241382/18268321/7e65e9a8-7423-11e6-92a1-89ec86710607.png)\r\nNote that this layout would work if we didn't split the lists as well, but more complex scenarios wouldn't\r\n\r\n```python\r\n    def process_split(self):\r\n        monad = self.monad\r\n        in_node = monad.input_node\r\n        out_node = monad.output_node\r\n        ul = make_tree_from_nodes([out_node.name], monad, down=False)\r\n\r\n        data_out = [[] for s in self.outputs]\r\n\r\n        data = [s.sv_get(deepcopy=False) for s in self.inputs]\r\n\r\n        for data in zip(*match_long_repeat(data)):\r\n            for idx, d in enumerate(data):\r\n                in_node.outputs[idx].sv_set([d])\r\n            do_update(ul, monad.nodes)\r\n            for idx, s in enumerate(out_node.inputs[:-1]):\r\n                data_out[idx].extend(s.sv_get(deepcopy=False))\r\n\r\n        for idx, socket in enumerate(self.outputs):\r\n            if socket.is_linked:\r\n                socket.sv_set(data_out[idx])\r\n```"},"comment":{"url":"https://api.github.com/repos/nortikin/sverchok/issues/comments/246098240","html_url":"https://github.com/nortikin/sverchok/issues/863#issuecomment-246098240","issue_url":"https://api.github.com/repos/nortikin/sverchok/issues/863","id":246098240,"user":{"login":"zeffii","id":619340,"avatar_url":"https://avatars.githubusercontent.com/u/619340?v=3","gravatar_id":"","url":"https://api.github.com/users/zeffii","html_url":"https://github.com/zeffii","followers_url":"https://api.github.com/users/zeffii/followers","following_url":"https://api.github.com/users/zeffii/following{/other_user}","gists_url":"https://api.github.com/users/zeffii/gists{/gist_id}","starred_url":"https://api.github.com/users/zeffii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeffii/subscriptions","organizations_url":"https://api.github.com/users/zeffii/orgs","repos_url":"https://api.github.com/users/zeffii/repos","events_url":"https://api.github.com/users/zeffii/events{/privacy}","received_events_url":"https://api.github.com/users/zeffii/received_events","type":"User","site_admin":false},"created_at":"2016-09-10T07:58:57Z","updated_at":"2016-09-10T07:58:57Z","body":"@ly29 the blend opens with the monad in red here.."}}
{"actor":{"display_login":"zeffii"}}