{"action":"created","comment":{"url":"https://api.github.com/repos/mrocklin/sparse/pulls/comments/114680403","pull_request_review_id":36167540,"id":114680403,"diff_hunk":"@@ -130,12 +131,43 @@ def test_dot():\n     a = random_x((3, 4, 5))\n     b = random_x((5, 6))\n \n+    la = a.tolist()\n+    lb = b.tolist()\n+    la, lb          # silencing flake8\n+\n     sa = COO.from_numpy(a)\n     sb = COO.from_numpy(b)\n \n     assert_eq(a.dot(b), sa.dot(sb))\n     assert_eq(np.dot(a, b), sparse.dot(sa, sb))\n \n+    if sys.version_info >= (3, 5):\n+        # Basic equivalences\n+        assert_eq(eval(\"a @ b\"), eval(\"sa @ sb\"))\n+        assert_eq(eval(\"sa @ sb\"), sparse.dot(sa, sb))\n+\n+        # Test that SOO's and np.array's combine correctly\n+        assert_eq(eval(\"a @ sb\"), eval(\"sa @ b\"))","path":"sparse/tests/test_core.py","position":27,"original_position":27,"commit_id":"30919413a4ae5b07a1060f028a833f95b415d3ad","original_commit_id":"30919413a4ae5b07a1060f028a833f95b415d3ad","user":{"login":"DavidMertz","id":2380665,"avatar_url":"https://avatars1.githubusercontent.com/u/2380665?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidMertz","html_url":"https://github.com/DavidMertz","followers_url":"https://api.github.com/users/DavidMertz/followers","following_url":"https://api.github.com/users/DavidMertz/following{/other_user}","gists_url":"https://api.github.com/users/DavidMertz/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidMertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidMertz/subscriptions","organizations_url":"https://api.github.com/users/DavidMertz/orgs","repos_url":"https://api.github.com/users/DavidMertz/repos","events_url":"https://api.github.com/users/DavidMertz/events{/privacy}","received_events_url":"https://api.github.com/users/DavidMertz/received_events","type":"User","site_admin":false},"body":"This gets a failure that doesn't seem straightforward to fix.  But moreover, I wouldn't really *expect* it to work as a user.\r\n\r\n```python\r\nsparse/core.py:448: in __mul__\r\n    return self.elemwise_binary(operator.mul, other)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nself = <COO: shape=(3, 4, 5), dtype=float64, nnz=6>\r\nfunc = <built-in function mul>\r\nother = <COO: shape=(5, 6), dtype=float64, nnz=4>, args = (), kwargs = {}\r\n\r\n    def elemwise_binary(self, func, other, *args, **kwargs):\r\n        assert isinstance(other, COO)\r\n        if kwargs.pop('check', True) and func(0, 0, *args, **kwargs) != 0:\r\n            raise ValueError(\"Performing this operation would produce \"\r\n                    \"a dense result: %s\" % str(func))\r\n        if self.shape != other.shape:\r\n>           raise NotImplementedError(\"Broadcasting is not supported\")\r\nE           NotImplementedError: Broadcasting is not supported\r\n\r\nsparse/core.py:478: NotImplementedError\r\n```","created_at":"2017-05-04T00:04:19Z","updated_at":"2017-05-04T00:04:19Z","html_url":"https://github.com/mrocklin/sparse/pull/16#discussion_r114680403","pull_request_url":"https://api.github.com/repos/mrocklin/sparse/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/mrocklin/sparse/pulls/comments/114680403"},"html":{"href":"https://github.com/mrocklin/sparse/pull/16#discussion_r114680403"},"pull_request":{"href":"https://api.github.com/repos/mrocklin/sparse/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/mrocklin/sparse/pulls/16","id":118858017,"html_url":"https://github.com/mrocklin/sparse/pull/16","diff_url":"https://github.com/mrocklin/sparse/pull/16.diff","patch_url":"https://github.com/mrocklin/sparse/pull/16.patch","issue_url":"https://api.github.com/repos/mrocklin/sparse/issues/16","number":16,"state":"open","locked":false,"title":"Add @ operator (simplify)","user":{"login":"DavidMertz","id":2380665,"avatar_url":"https://avatars1.githubusercontent.com/u/2380665?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidMertz","html_url":"https://github.com/DavidMertz","followers_url":"https://api.github.com/users/DavidMertz/followers","following_url":"https://api.github.com/users/DavidMertz/following{/other_user}","gists_url":"https://api.github.com/users/DavidMertz/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidMertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidMertz/subscriptions","organizations_url":"https://api.github.com/users/DavidMertz/orgs","repos_url":"https://api.github.com/users/DavidMertz/repos","events_url":"https://api.github.com/users/DavidMertz/events{/privacy}","received_events_url":"https://api.github.com/users/DavidMertz/received_events","type":"User","site_admin":false},"body":"This supersedes the closed https://github.com/mrocklin/sparse/pull/14.\r\n\r\nThis request simply adds the `__matmul__` and `__rmatmul__` with no behavior other than that delegated to `sparse.dot()`.  Checks for \"correct\" non-combination of lists with COOs remains.  A more specific `return NotImplemented` is returned for things lacking an `.ndim`, which gives us a better error of:\r\n\r\n```python\r\nTypeError: unsupported operand type(s) for @: 'list' and 'COO'\r\n```","created_at":"2017-05-03T21:22:57Z","updated_at":"2017-05-04T00:04:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"344bf6fe355a88a2ab47da5a6a947101a0747ba7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mrocklin/sparse/pulls/16/commits","review_comments_url":"https://api.github.com/repos/mrocklin/sparse/pulls/16/comments","review_comment_url":"https://api.github.com/repos/mrocklin/sparse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrocklin/sparse/issues/16/comments","statuses_url":"https://api.github.com/repos/mrocklin/sparse/statuses/30919413a4ae5b07a1060f028a833f95b415d3ad","head":{"label":"ContinuumIO:master","ref":"master","sha":"30919413a4ae5b07a1060f028a833f95b415d3ad","user":{"login":"ContinuumIO","id":1158637,"avatar_url":"https://avatars0.githubusercontent.com/u/1158637?v=3","gravatar_id":"","url":"https://api.github.com/users/ContinuumIO","html_url":"https://github.com/ContinuumIO","followers_url":"https://api.github.com/users/ContinuumIO/followers","following_url":"https://api.github.com/users/ContinuumIO/following{/other_user}","gists_url":"https://api.github.com/users/ContinuumIO/gists{/gist_id}","starred_url":"https://api.github.com/users/ContinuumIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ContinuumIO/subscriptions","organizations_url":"https://api.github.com/users/ContinuumIO/orgs","repos_url":"https://api.github.com/users/ContinuumIO/repos","events_url":"https://api.github.com/users/ContinuumIO/events{/privacy}","received_events_url":"https://api.github.com/users/ContinuumIO/received_events","type":"Organization","site_admin":false},"repo":{"id":90050221,"name":"sparse","full_name":"ContinuumIO/sparse","owner":{"login":"ContinuumIO","id":1158637,"avatar_url":"https://avatars0.githubusercontent.com/u/1158637?v=3","gravatar_id":"","url":"https://api.github.com/users/ContinuumIO","html_url":"https://github.com/ContinuumIO","followers_url":"https://api.github.com/users/ContinuumIO/followers","following_url":"https://api.github.com/users/ContinuumIO/following{/other_user}","gists_url":"https://api.github.com/users/ContinuumIO/gists{/gist_id}","starred_url":"https://api.github.com/users/ContinuumIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ContinuumIO/subscriptions","organizations_url":"https://api.github.com/users/ContinuumIO/orgs","repos_url":"https://api.github.com/users/ContinuumIO/repos","events_url":"https://api.github.com/users/ContinuumIO/events{/privacy}","received_events_url":"https://api.github.com/users/ContinuumIO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ContinuumIO/sparse","description":null,"fork":true,"url":"https://api.github.com/repos/ContinuumIO/sparse","forks_url":"https://api.github.com/repos/ContinuumIO/sparse/forks","keys_url":"https://api.github.com/repos/ContinuumIO/sparse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ContinuumIO/sparse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ContinuumIO/sparse/teams","hooks_url":"https://api.github.com/repos/ContinuumIO/sparse/hooks","issue_events_url":"https://api.github.com/repos/ContinuumIO/sparse/issues/events{/number}","events_url":"https://api.github.com/repos/ContinuumIO/sparse/events","assignees_url":"https://api.github.com/repos/ContinuumIO/sparse/assignees{/user}","branches_url":"https://api.github.com/repos/ContinuumIO/sparse/branches{/branch}","tags_url":"https://api.github.com/repos/ContinuumIO/sparse/tags","blobs_url":"https://api.github.com/repos/ContinuumIO/sparse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ContinuumIO/sparse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ContinuumIO/sparse/git/refs{/sha}","trees_url":"https://api.github.com/repos/ContinuumIO/sparse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ContinuumIO/sparse/statuses/{sha}","languages_url":"https://api.github.com/repos/ContinuumIO/sparse/languages","stargazers_url":"https://api.github.com/repos/ContinuumIO/sparse/stargazers","contributors_url":"https://api.github.com/repos/ContinuumIO/sparse/contributors","subscribers_url":"https://api.github.com/repos/ContinuumIO/sparse/subscribers","subscription_url":"https://api.github.com/repos/ContinuumIO/sparse/subscription","commits_url":"https://api.github.com/repos/ContinuumIO/sparse/commits{/sha}","git_commits_url":"https://api.github.com/repos/ContinuumIO/sparse/git/commits{/sha}","comments_url":"https://api.github.com/repos/ContinuumIO/sparse/comments{/number}","issue_comment_url":"https://api.github.com/repos/ContinuumIO/sparse/issues/comments{/number}","contents_url":"https://api.github.com/repos/ContinuumIO/sparse/contents/{+path}","compare_url":"https://api.github.com/repos/ContinuumIO/sparse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ContinuumIO/sparse/merges","archive_url":"https://api.github.com/repos/ContinuumIO/sparse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ContinuumIO/sparse/downloads","issues_url":"https://api.github.com/repos/ContinuumIO/sparse/issues{/number}","pulls_url":"https://api.github.com/repos/ContinuumIO/sparse/pulls{/number}","milestones_url":"https://api.github.com/repos/ContinuumIO/sparse/milestones{/number}","notifications_url":"https://api.github.com/repos/ContinuumIO/sparse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ContinuumIO/sparse/labels{/name}","releases_url":"https://api.github.com/repos/ContinuumIO/sparse/releases{/id}","deployments_url":"https://api.github.com/repos/ContinuumIO/sparse/deployments","created_at":"2017-05-02T15:42:00Z","updated_at":"2017-05-02T15:42:02Z","pushed_at":"2017-05-03T21:52:25Z","git_url":"git://github.com/ContinuumIO/sparse.git","ssh_url":"git@github.com:ContinuumIO/sparse.git","clone_url":"https://github.com/ContinuumIO/sparse.git","svn_url":"https://github.com/ContinuumIO/sparse","homepage":null,"size":78,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mrocklin:master","ref":"master","sha":"973cac390abd64dac638c7551bdb1a05c090901b","user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars0.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"repo":{"id":88426738,"name":"sparse","full_name":"mrocklin/sparse","owner":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars0.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrocklin/sparse","description":null,"fork":false,"url":"https://api.github.com/repos/mrocklin/sparse","forks_url":"https://api.github.com/repos/mrocklin/sparse/forks","keys_url":"https://api.github.com/repos/mrocklin/sparse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrocklin/sparse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrocklin/sparse/teams","hooks_url":"https://api.github.com/repos/mrocklin/sparse/hooks","issue_events_url":"https://api.github.com/repos/mrocklin/sparse/issues/events{/number}","events_url":"https://api.github.com/repos/mrocklin/sparse/events","assignees_url":"https://api.github.com/repos/mrocklin/sparse/assignees{/user}","branches_url":"https://api.github.com/repos/mrocklin/sparse/branches{/branch}","tags_url":"https://api.github.com/repos/mrocklin/sparse/tags","blobs_url":"https://api.github.com/repos/mrocklin/sparse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrocklin/sparse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrocklin/sparse/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrocklin/sparse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrocklin/sparse/statuses/{sha}","languages_url":"https://api.github.com/repos/mrocklin/sparse/languages","stargazers_url":"https://api.github.com/repos/mrocklin/sparse/stargazers","contributors_url":"https://api.github.com/repos/mrocklin/sparse/contributors","subscribers_url":"https://api.github.com/repos/mrocklin/sparse/subscribers","subscription_url":"https://api.github.com/repos/mrocklin/sparse/subscription","commits_url":"https://api.github.com/repos/mrocklin/sparse/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrocklin/sparse/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrocklin/sparse/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrocklin/sparse/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrocklin/sparse/contents/{+path}","compare_url":"https://api.github.com/repos/mrocklin/sparse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrocklin/sparse/merges","archive_url":"https://api.github.com/repos/mrocklin/sparse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrocklin/sparse/downloads","issues_url":"https://api.github.com/repos/mrocklin/sparse/issues{/number}","pulls_url":"https://api.github.com/repos/mrocklin/sparse/pulls{/number}","milestones_url":"https://api.github.com/repos/mrocklin/sparse/milestones{/number}","notifications_url":"https://api.github.com/repos/mrocklin/sparse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrocklin/sparse/labels{/name}","releases_url":"https://api.github.com/repos/mrocklin/sparse/releases{/id}","deployments_url":"https://api.github.com/repos/mrocklin/sparse/deployments","created_at":"2017-04-16T16:12:10Z","updated_at":"2017-04-30T19:52:22Z","pushed_at":"2017-05-03T21:59:08Z","git_url":"git://github.com/mrocklin/sparse.git","ssh_url":"git@github.com:mrocklin/sparse.git","clone_url":"https://github.com/mrocklin/sparse.git","svn_url":"https://github.com/mrocklin/sparse","homepage":null,"size":58,"stargazers_count":32,"watchers_count":32,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mrocklin/sparse/pulls/16"},"html":{"href":"https://github.com/mrocklin/sparse/pull/16"},"issue":{"href":"https://api.github.com/repos/mrocklin/sparse/issues/16"},"comments":{"href":"https://api.github.com/repos/mrocklin/sparse/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/mrocklin/sparse/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/mrocklin/sparse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrocklin/sparse/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/mrocklin/sparse/statuses/30919413a4ae5b07a1060f028a833f95b415d3ad"}}}}
{"actor":{"display_login":"DavidMertz"}}