{"action":"created","comment":{"url":"https://api.github.com/repos/cbm755/octsympy/pulls/comments/50316369","id":50316369,"diff_hunk":"@@ -26,39 +26,32 @@\n %% Author: Colin B. Macdonald\n %% Keywords: symbolic\n \n-function r = setxor(A, B)\n-\n-  % FIXME: is it worth splitting out a \"private/set_helper\"?\n-\n-  cmd = { 'A, B = _ins'\n-          'try:'\n-          '    A = iter(A)'\n-          'except TypeError:'\n-          '    A = set([A])'\n-          'else:'\n-          '    A = set(A)'\n-          'try:'\n-          '    B = iter(B)'\n-          'except TypeError:'\n-          '    B = set([B])'\n-          'else:'\n-          '    B = set(B)'\n-          'C = A.symmetric_difference(B)'\n-          'C = sympy.Matrix([list(C)])'\n-          'return C,' };\n-\n-  A = sym(A);\n-  B = sym(B);\n-  r = python_cmd (cmd, A, B);\n-\n-  % reshape to column if both inputs are\n-  if (iscolumn(A) && iscolumn(B))\n-    r = reshape(r, length(r), 1);\n-  end\n+function r = setxor(a, b)\n+\n+  %%FIXME: In future version of SymPy, replace (A - B) | (B - A) with A ^ B\n+  % Version(spver) >= Version(\"0.7.7.dev\")\n+\n+  cmd = {\n+         'a, b = _ins'\n+         'if isinstance(a, sp.Set) or isinstance(b, sp.Set):'\n+         '    return (a - b) | (b - a), 1'\n+         ''\n+         'A = sp.FiniteSet(*(list(a) if isinstance(a, sp.MatrixBase) else [a]))'\n+         'B = sp.FiniteSet(*(list(b) if isinstance(b, sp.MatrixBase) else [b]))'\n+         'C = (A - B) | (B - A)'\n+         'return sp.Matrix([[list(C)]]), 0'\n+        };\n+\n+    [r, out] = python_cmd (cmd, sym(a), sym(b));\n+\n+    if !out\n+      r = horzcat(r{:});\n+    end\n \n end\n \n \n+","path":"inst/@sym/setxor.m","position":58,"original_position":58,"commit_id":"a66d413c7e3f9a2d55d401610711109d0541fdb9","original_commit_id":"a66d413c7e3f9a2d55d401610711109d0541fdb9","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":"upstream octave style says exactly two blank spaces after function end and before  tests","created_at":"2016-01-20T20:47:44Z","updated_at":"2016-01-20T20:47:44Z","html_url":"https://github.com/cbm755/octsympy/pull/322#discussion_r50316369","pull_request_url":"https://api.github.com/repos/cbm755/octsympy/pulls/322","_links":{"self":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/comments/50316369"},"html":{"href":"https://github.com/cbm755/octsympy/pull/322#discussion_r50316369"},"pull_request":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/322"}}},"pull_request":{"url":"https://api.github.com/repos/cbm755/octsympy/pulls/322","id":56592923,"html_url":"https://github.com/cbm755/octsympy/pull/322","diff_url":"https://github.com/cbm755/octsympy/pull/322.diff","patch_url":"https://github.com/cbm755/octsympy/pull/322.patch","issue_url":"https://api.github.com/repos/cbm755/octsympy/issues/322","number":322,"state":"open","locked":false,"title":"sets op 2 vars","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":"Hi, here simplified version.\r\nFixes https://github.com/cbm755/octsympy/issues/147","created_at":"2016-01-20T11:03:29Z","updated_at":"2016-01-20T20:47:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4c22fc2d1f2e1934cd15646dd2ac910f1eb615c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cbm755/octsympy/pulls/322/commits","review_comments_url":"https://api.github.com/repos/cbm755/octsympy/pulls/322/comments","review_comment_url":"https://api.github.com/repos/cbm755/octsympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cbm755/octsympy/issues/322/comments","statuses_url":"https://api.github.com/repos/cbm755/octsympy/statuses/a66d413c7e3f9a2d55d401610711109d0541fdb9","head":{"label":"latot:simsets","ref":"simsets","sha":"a66d413c7e3f9a2d55d401610711109d0541fdb9","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}","created_at":"2015-12-17T07:41:40Z","updated_at":"2016-01-11T23:53:03Z","pushed_at":"2016-01-20T20:17:23Z","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":2196,"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":"2632d5db92e6b089e910e5ad6e0de4336e8f38b9","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}","created_at":"2014-04-10T15:25:39Z","updated_at":"2016-01-18T18:36:31Z","pushed_at":"2016-01-20T20:44:03Z","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":2230,"stargazers_count":17,"watchers_count":17,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":64,"forks":7,"open_issues":64,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/322"},"html":{"href":"https://github.com/cbm755/octsympy/pull/322"},"issue":{"href":"https://api.github.com/repos/cbm755/octsympy/issues/322"},"comments":{"href":"https://api.github.com/repos/cbm755/octsympy/issues/322/comments"},"review_comments":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/322/comments"},"review_comment":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cbm755/octsympy/pulls/322/commits"},"statuses":{"href":"https://api.github.com/repos/cbm755/octsympy/statuses/a66d413c7e3f9a2d55d401610711109d0541fdb9"}}}}