{"action":"created","comment":{"url":"https://api.github.com/repos/cbm755/octsympy/pulls/comments/85651132","pull_request_review_id":6356428,"id":85651132,"diff_hunk":"@@ -44,19 +43,20 @@\n \n   % note: cmd is already cell array, hence [ concatenates with it\n   cmd = [ cmd\n-          '(x, y) = _ins'\n-          'if x.is_Matrix and y.is_Matrix:'\n-          '    assert x.shape == y.shape'\n-          '    A = sp.Matrix(x.shape[0], x.shape[1],'\n-          '        lambda i,j: _op(x[i,j], y[i,j]))'\n-          '    return A,'\n-          'elif x.is_Matrix:'\n-          '    return x.applyfunc(lambda a: _op(a, y)),'\n-          'elif y.is_Matrix:'\n-          '    return y.applyfunc(lambda a: _op(x, a)),'\n-          'else:'\n-          '    return _op(x, y),' ];\n+          'l = (1, 1)'\n+          'for i in range(len(_ins)):'\n+          '    if isinstance(_ins[i], MatrixBase):'\n+          '        if _ins[i].shape != (1, 1):'\n+          '            l = _ins[i].shape'\n+          '        else:'\n+          '            assert l == _ins[i].shape, \"Matrix must have equal sizes\"'\n+          '    else:'\n+          '        _ins[i] = Matrix([_ins[i]])'\n+          'base = zeros(*l)'\n+          'for i in itertools.product(*map(Range, l)):'\n+          '    base.__setitem__(i, _op(*[k[0] if k.shape == (1, 1) else k.__getitem__(i) for k in _ins]))'\n+          'return base,' ];\n \n-  z = python_cmd (cmd, sym(x), sym(y));\n+  z = python_cmd (cmd, sym(varargin){:});","path":"inst/@sym/private/op_helper.m","position":68,"original_position":68,"commit_id":"f637244ac89184c3931f42ea819e9918ae2b29cd","original_commit_id":"f637244ac89184c3931f42ea819e9918ae2b29cd","user":{"login":"cbm755","id":818622,"avatar_url":"https://avatars.githubusercontent.com/u/818622?v=3","gravatar_id":"","url":"https://api.github.com/users/cbm755","html_url":"https://github.com/cbm755","followers_url":"https://api.github.com/users/cbm755/followers","following_url":"https://api.github.com/users/cbm755/following{/other_user}","gists_url":"https://api.github.com/users/cbm755/gists{/gist_id}","starred_url":"https://api.github.com/users/cbm755/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbm755/subscriptions","organizations_url":"https://api.github.com/users/cbm755/orgs","repos_url":"https://api.github.com/users/cbm755/repos","events_url":"https://api.github.com/users/cbm755/events{/privacy}","received_events_url":"https://api.github.com/users/cbm755/received_events","type":"User","site_admin":false},"body":"Can't change indexing on Matlab (I think).  Also, IIRC, we might deprecate `sym(cellarray)`.  Can you use `cellfun` or something to do it?","created_at":"2016-10-30T01:04:52Z","updated_at":"2016-10-30T01:44:35Z","html_url":"https://github.com/cbm755/octsympy/pull/640#discussion_r85651132","pull_request_url":"https://api.github.com/repos/cbm755/octsympy/pulls/640","_links":{"self":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/comments/85651132"},"html":{"href":"https://github.com/cbm755/octsympy/pull/640#discussion_r85651132"},"pull_request":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/640"}}},"pull_request":{"url":"https://api.github.com/repos/cbm755/octsympy/pulls/640","id":91386232,"html_url":"https://github.com/cbm755/octsympy/pull/640","diff_url":"https://github.com/cbm755/octsympy/pull/640.diff","patch_url":"https://github.com/cbm755/octsympy/pull/640.patch","issue_url":"https://api.github.com/repos/cbm755/octsympy/issues/640","number":640,"state":"open","locked":false,"title":"Improve op_helper - Clean helpers","user":{"login":"latot","id":10523095,"avatar_url":"https://avatars.githubusercontent.com/u/10523095?v=3","gravatar_id":"","url":"https://api.github.com/users/latot","html_url":"https://github.com/latot","followers_url":"https://api.github.com/users/latot/followers","following_url":"https://api.github.com/users/latot/following{/other_user}","gists_url":"https://api.github.com/users/latot/gists{/gist_id}","starred_url":"https://api.github.com/users/latot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latot/subscriptions","organizations_url":"https://api.github.com/users/latot/orgs","repos_url":"https://api.github.com/users/latot/repos","events_url":"https://api.github.com/users/latot/events{/privacy}","received_events_url":"https://api.github.com/users/latot/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/cbm755/octsympy/issues/639\r\n\r\nHi, well, now this is a little clean in the helpers, and a generalization of it, so we will no need rewrite new functions for this, this code practically don't affect performance, with relative low interaction (less than 1000 operations) are very similar, some times one is faster other moments the other, while with a 10000 operations we finally can see we have an approximation of 6% of less performance.\r\n\r\nOther point is with this is defined the operation element by element to any function, and if we found some problem we only need fix one file instead of 3.\r\n\r\nI write this code in this way thinking in Tensor.\r\n\r\nThx. Cya.","created_at":"2016-10-28T13:57:36Z","updated_at":"2016-10-30T01:44:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64d6504eabed2a0a7a689e4873f983570150502d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cbm755/octsympy/pulls/640/commits","review_comments_url":"https://api.github.com/repos/cbm755/octsympy/pulls/640/comments","review_comment_url":"https://api.github.com/repos/cbm755/octsympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cbm755/octsympy/issues/640/comments","statuses_url":"https://api.github.com/repos/cbm755/octsympy/statuses/f637244ac89184c3931f42ea819e9918ae2b29cd","head":{"label":"latot:op","ref":"op","sha":"f637244ac89184c3931f42ea819e9918ae2b29cd","user":{"login":"latot","id":10523095,"avatar_url":"https://avatars.githubusercontent.com/u/10523095?v=3","gravatar_id":"","url":"https://api.github.com/users/latot","html_url":"https://github.com/latot","followers_url":"https://api.github.com/users/latot/followers","following_url":"https://api.github.com/users/latot/following{/other_user}","gists_url":"https://api.github.com/users/latot/gists{/gist_id}","starred_url":"https://api.github.com/users/latot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latot/subscriptions","organizations_url":"https://api.github.com/users/latot/orgs","repos_url":"https://api.github.com/users/latot/repos","events_url":"https://api.github.com/users/latot/events{/privacy}","received_events_url":"https://api.github.com/users/latot/received_events","type":"User","site_admin":false},"repo":{"id":48159914,"name":"octsympy","full_name":"latot/octsympy","owner":{"login":"latot","id":10523095,"avatar_url":"https://avatars.githubusercontent.com/u/10523095?v=3","gravatar_id":"","url":"https://api.github.com/users/latot","html_url":"https://github.com/latot","followers_url":"https://api.github.com/users/latot/followers","following_url":"https://api.github.com/users/latot/following{/other_user}","gists_url":"https://api.github.com/users/latot/gists{/gist_id}","starred_url":"https://api.github.com/users/latot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latot/subscriptions","organizations_url":"https://api.github.com/users/latot/orgs","repos_url":"https://api.github.com/users/latot/repos","events_url":"https://api.github.com/users/latot/events{/privacy}","received_events_url":"https://api.github.com/users/latot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/latot/octsympy","description":"A Symbolic Package for Octave using SymPy","fork":true,"url":"https://api.github.com/repos/latot/octsympy","forks_url":"https://api.github.com/repos/latot/octsympy/forks","keys_url":"https://api.github.com/repos/latot/octsympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/latot/octsympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/latot/octsympy/teams","hooks_url":"https://api.github.com/repos/latot/octsympy/hooks","issue_events_url":"https://api.github.com/repos/latot/octsympy/issues/events{/number}","events_url":"https://api.github.com/repos/latot/octsympy/events","assignees_url":"https://api.github.com/repos/latot/octsympy/assignees{/user}","branches_url":"https://api.github.com/repos/latot/octsympy/branches{/branch}","tags_url":"https://api.github.com/repos/latot/octsympy/tags","blobs_url":"https://api.github.com/repos/latot/octsympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/latot/octsympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/latot/octsympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/latot/octsympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/latot/octsympy/statuses/{sha}","languages_url":"https://api.github.com/repos/latot/octsympy/languages","stargazers_url":"https://api.github.com/repos/latot/octsympy/stargazers","contributors_url":"https://api.github.com/repos/latot/octsympy/contributors","subscribers_url":"https://api.github.com/repos/latot/octsympy/subscribers","subscription_url":"https://api.github.com/repos/latot/octsympy/subscription","commits_url":"https://api.github.com/repos/latot/octsympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/latot/octsympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/latot/octsympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/latot/octsympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/latot/octsympy/contents/{+path}","compare_url":"https://api.github.com/repos/latot/octsympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/latot/octsympy/merges","archive_url":"https://api.github.com/repos/latot/octsympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/latot/octsympy/downloads","issues_url":"https://api.github.com/repos/latot/octsympy/issues{/number}","pulls_url":"https://api.github.com/repos/latot/octsympy/pulls{/number}","milestones_url":"https://api.github.com/repos/latot/octsympy/milestones{/number}","notifications_url":"https://api.github.com/repos/latot/octsympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/latot/octsympy/labels{/name}","releases_url":"https://api.github.com/repos/latot/octsympy/releases{/id}","deployments_url":"https://api.github.com/repos/latot/octsympy/deployments","created_at":"2015-12-17T07:41:40Z","updated_at":"2016-01-11T23:53:03Z","pushed_at":"2016-10-29T16:06:35Z","git_url":"git://github.com/latot/octsympy.git","ssh_url":"git@github.com:latot/octsympy.git","clone_url":"https://github.com/latot/octsympy.git","svn_url":"https://github.com/latot/octsympy","homepage":"","size":3240,"stargazers_count":0,"watchers_count":0,"language":"Matlab","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cbm755:master","ref":"master","sha":"b45ff288ad0d7bc26688e31bb65c190a1cc4b78d","user":{"login":"cbm755","id":818622,"avatar_url":"https://avatars.githubusercontent.com/u/818622?v=3","gravatar_id":"","url":"https://api.github.com/users/cbm755","html_url":"https://github.com/cbm755","followers_url":"https://api.github.com/users/cbm755/followers","following_url":"https://api.github.com/users/cbm755/following{/other_user}","gists_url":"https://api.github.com/users/cbm755/gists{/gist_id}","starred_url":"https://api.github.com/users/cbm755/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbm755/subscriptions","organizations_url":"https://api.github.com/users/cbm755/orgs","repos_url":"https://api.github.com/users/cbm755/repos","events_url":"https://api.github.com/users/cbm755/events{/privacy}","received_events_url":"https://api.github.com/users/cbm755/received_events","type":"User","site_admin":false},"repo":{"id":18641463,"name":"octsympy","full_name":"cbm755/octsympy","owner":{"login":"cbm755","id":818622,"avatar_url":"https://avatars.githubusercontent.com/u/818622?v=3","gravatar_id":"","url":"https://api.github.com/users/cbm755","html_url":"https://github.com/cbm755","followers_url":"https://api.github.com/users/cbm755/followers","following_url":"https://api.github.com/users/cbm755/following{/other_user}","gists_url":"https://api.github.com/users/cbm755/gists{/gist_id}","starred_url":"https://api.github.com/users/cbm755/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbm755/subscriptions","organizations_url":"https://api.github.com/users/cbm755/orgs","repos_url":"https://api.github.com/users/cbm755/repos","events_url":"https://api.github.com/users/cbm755/events{/privacy}","received_events_url":"https://api.github.com/users/cbm755/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbm755/octsympy","description":"A Symbolic Package for Octave using SymPy","fork":false,"url":"https://api.github.com/repos/cbm755/octsympy","forks_url":"https://api.github.com/repos/cbm755/octsympy/forks","keys_url":"https://api.github.com/repos/cbm755/octsympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbm755/octsympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbm755/octsympy/teams","hooks_url":"https://api.github.com/repos/cbm755/octsympy/hooks","issue_events_url":"https://api.github.com/repos/cbm755/octsympy/issues/events{/number}","events_url":"https://api.github.com/repos/cbm755/octsympy/events","assignees_url":"https://api.github.com/repos/cbm755/octsympy/assignees{/user}","branches_url":"https://api.github.com/repos/cbm755/octsympy/branches{/branch}","tags_url":"https://api.github.com/repos/cbm755/octsympy/tags","blobs_url":"https://api.github.com/repos/cbm755/octsympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbm755/octsympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbm755/octsympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbm755/octsympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbm755/octsympy/statuses/{sha}","languages_url":"https://api.github.com/repos/cbm755/octsympy/languages","stargazers_url":"https://api.github.com/repos/cbm755/octsympy/stargazers","contributors_url":"https://api.github.com/repos/cbm755/octsympy/contributors","subscribers_url":"https://api.github.com/repos/cbm755/octsympy/subscribers","subscription_url":"https://api.github.com/repos/cbm755/octsympy/subscription","commits_url":"https://api.github.com/repos/cbm755/octsympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbm755/octsympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbm755/octsympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbm755/octsympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbm755/octsympy/contents/{+path}","compare_url":"https://api.github.com/repos/cbm755/octsympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbm755/octsympy/merges","archive_url":"https://api.github.com/repos/cbm755/octsympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbm755/octsympy/downloads","issues_url":"https://api.github.com/repos/cbm755/octsympy/issues{/number}","pulls_url":"https://api.github.com/repos/cbm755/octsympy/pulls{/number}","milestones_url":"https://api.github.com/repos/cbm755/octsympy/milestones{/number}","notifications_url":"https://api.github.com/repos/cbm755/octsympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbm755/octsympy/labels{/name}","releases_url":"https://api.github.com/repos/cbm755/octsympy/releases{/id}","deployments_url":"https://api.github.com/repos/cbm755/octsympy/deployments","created_at":"2014-04-10T15:25:39Z","updated_at":"2016-10-28T09:34:44Z","pushed_at":"2016-10-29T16:06:36Z","git_url":"git://github.com/cbm755/octsympy.git","ssh_url":"git@github.com:cbm755/octsympy.git","clone_url":"https://github.com/cbm755/octsympy.git","svn_url":"https://github.com/cbm755/octsympy","homepage":"","size":3411,"stargazers_count":24,"watchers_count":24,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":126,"forks":12,"open_issues":126,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/640"},"html":{"href":"https://github.com/cbm755/octsympy/pull/640"},"issue":{"href":"https://api.github.com/repos/cbm755/octsympy/issues/640"},"comments":{"href":"https://api.github.com/repos/cbm755/octsympy/issues/640/comments"},"review_comments":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/640/comments"},"review_comment":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/640/commits"},"statuses":{"href":"https://api.github.com/repos/cbm755/octsympy/statuses/f637244ac89184c3931f42ea819e9918ae2b29cd"}}}}
{"actor":{"display_login":"cbm755"}}