{"action":"created","comment":{"url":"https://api.github.com/repos/scipy/scipy/pulls/comments/207246054","pull_request_review_id":142818119,"id":207246054,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzI0NjA1NA==","diff_hunk":"@@ -153,7 +153,7 @@ def __init__(self, arg1, shape=None, dtype=None, copy=False):\n                     M, N = shape\n                     self._shape = check_shape((M, N))\n \n-                idx_dtype = get_index_dtype(maxval=max(self.shape))\n+                idx_dtype = get_index_dtype(maxval=self.shape[0] * self.shape[1])","path":"scipy/sparse/coo.py","position":5,"original_position":5,"commit_id":"0064ba7113ac2a0d778b926c56d1300dc995842d","original_commit_id":"0064ba7113ac2a0d778b926c56d1300dc995842d","user":{"login":"perimosocordiae","id":82855,"node_id":"MDQ6VXNlcjgyODU1","avatar_url":"https://avatars3.githubusercontent.com/u/82855?v=4","gravatar_id":"","url":"https://api.github.com/users/perimosocordiae","html_url":"https://github.com/perimosocordiae","followers_url":"https://api.github.com/users/perimosocordiae/followers","following_url":"https://api.github.com/users/perimosocordiae/following{/other_user}","gists_url":"https://api.github.com/users/perimosocordiae/gists{/gist_id}","starred_url":"https://api.github.com/users/perimosocordiae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perimosocordiae/subscriptions","organizations_url":"https://api.github.com/users/perimosocordiae/orgs","repos_url":"https://api.github.com/users/perimosocordiae/repos","events_url":"https://api.github.com/users/perimosocordiae/events{/privacy}","received_events_url":"https://api.github.com/users/perimosocordiae/received_events","type":"User","site_admin":false},"body":"How would you feel about making the constructor less insistent on using the dtype given by `get_index_dtype`? That is, if the user provides index arrays with dtype larger or equal to the minimum dtype, just use them as-is.\r\n\r\n```python\r\nminimal_idx_dtype = get_index_dtype(maxval=max(self.shape))\r\nidx_dtype = np.find_common_dtype([row.dtype, col.dtype, minimal_idx_dtype], [])\r\n```\r\n\r\nThis way we could upcast on demand when reshaping, without having to downcast later.\r\n\r\n(Note that my code snippet isn't quite sufficient because `row` and `col` might not be numpy arrays with dtypes, but the idea is the same.)","created_at":"2018-08-02T14:25:00Z","updated_at":"2018-08-02T14:25:08Z","html_url":"https://github.com/scipy/scipy/pull/9087#discussion_r207246054","pull_request_url":"https://api.github.com/repos/scipy/scipy/pulls/9087","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments/207246054"},"html":{"href":"https://github.com/scipy/scipy/pull/9087#discussion_r207246054"},"pull_request":{"href":"https://api.github.com/repos/scipy/scipy/pulls/9087"}},"in_reply_to_id":207227582},"pull_request":{"url":"https://api.github.com/repos/scipy/scipy/pulls/9087","id":204650042,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjUwMDQy","html_url":"https://github.com/scipy/scipy/pull/9087","diff_url":"https://github.com/scipy/scipy/pull/9087.diff","patch_url":"https://github.com/scipy/scipy/pull/9087.patch","issue_url":"https://api.github.com/repos/scipy/scipy/issues/9087","number":9087,"state":"open","locked":false,"title":"ENH: Change COO index dtype so reshape will not fail","user":{"login":"drhagen","id":2952478,"node_id":"MDQ6VXNlcjI5NTI0Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2952478?v=4","gravatar_id":"","url":"https://api.github.com/users/drhagen","html_url":"https://github.com/drhagen","followers_url":"https://api.github.com/users/drhagen/followers","following_url":"https://api.github.com/users/drhagen/following{/other_user}","gists_url":"https://api.github.com/users/drhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/drhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drhagen/subscriptions","organizations_url":"https://api.github.com/users/drhagen/orgs","repos_url":"https://api.github.com/users/drhagen/repos","events_url":"https://api.github.com/users/drhagen/events{/privacy}","received_events_url":"https://api.github.com/users/drhagen/received_events","type":"User","site_admin":false},"body":"This is a new attempt to fix #8912 after my first attempt in #8983 failed.","created_at":"2018-07-29T16:27:27Z","updated_at":"2018-08-02T14:25:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9706529b8cb04c5bb6dd116767d6f0c28ca1e3d7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":37340735,"node_id":"MDU6TGFiZWwzNzM0MDczNQ==","url":"https://api.github.com/repos/scipy/scipy/labels/enhancement","name":"enhancement","color":"bfe5bf","default":true},{"id":37341004,"node_id":"MDU6TGFiZWwzNzM0MTAwNA==","url":"https://api.github.com/repos/scipy/scipy/labels/scipy.sparse","name":"scipy.sparse","color":"207de5","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/scipy/scipy/pulls/9087/commits","review_comments_url":"https://api.github.com/repos/scipy/scipy/pulls/9087/comments","review_comment_url":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/9087/comments","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/0064ba7113ac2a0d778b926c56d1300dc995842d","head":{"label":"drhagen:reshape-overflow","ref":"reshape-overflow","sha":"0064ba7113ac2a0d778b926c56d1300dc995842d","user":{"login":"drhagen","id":2952478,"node_id":"MDQ6VXNlcjI5NTI0Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2952478?v=4","gravatar_id":"","url":"https://api.github.com/users/drhagen","html_url":"https://github.com/drhagen","followers_url":"https://api.github.com/users/drhagen/followers","following_url":"https://api.github.com/users/drhagen/following{/other_user}","gists_url":"https://api.github.com/users/drhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/drhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drhagen/subscriptions","organizations_url":"https://api.github.com/users/drhagen/orgs","repos_url":"https://api.github.com/users/drhagen/repos","events_url":"https://api.github.com/users/drhagen/events{/privacy}","received_events_url":"https://api.github.com/users/drhagen/received_events","type":"User","site_admin":false},"repo":{"id":65550203,"node_id":"MDEwOlJlcG9zaXRvcnk2NTU1MDIwMw==","name":"scipy","full_name":"drhagen/scipy","owner":{"login":"drhagen","id":2952478,"node_id":"MDQ6VXNlcjI5NTI0Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2952478?v=4","gravatar_id":"","url":"https://api.github.com/users/drhagen","html_url":"https://github.com/drhagen","followers_url":"https://api.github.com/users/drhagen/followers","following_url":"https://api.github.com/users/drhagen/following{/other_user}","gists_url":"https://api.github.com/users/drhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/drhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drhagen/subscriptions","organizations_url":"https://api.github.com/users/drhagen/orgs","repos_url":"https://api.github.com/users/drhagen/repos","events_url":"https://api.github.com/users/drhagen/events{/privacy}","received_events_url":"https://api.github.com/users/drhagen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drhagen/scipy","description":null,"fork":true,"url":"https://api.github.com/repos/drhagen/scipy","forks_url":"https://api.github.com/repos/drhagen/scipy/forks","keys_url":"https://api.github.com/repos/drhagen/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drhagen/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drhagen/scipy/teams","hooks_url":"https://api.github.com/repos/drhagen/scipy/hooks","issue_events_url":"https://api.github.com/repos/drhagen/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/drhagen/scipy/events","assignees_url":"https://api.github.com/repos/drhagen/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/drhagen/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/drhagen/scipy/tags","blobs_url":"https://api.github.com/repos/drhagen/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drhagen/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drhagen/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/drhagen/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drhagen/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/drhagen/scipy/languages","stargazers_url":"https://api.github.com/repos/drhagen/scipy/stargazers","contributors_url":"https://api.github.com/repos/drhagen/scipy/contributors","subscribers_url":"https://api.github.com/repos/drhagen/scipy/subscribers","subscription_url":"https://api.github.com/repos/drhagen/scipy/subscription","commits_url":"https://api.github.com/repos/drhagen/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/drhagen/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/drhagen/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/drhagen/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/drhagen/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/drhagen/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drhagen/scipy/merges","archive_url":"https://api.github.com/repos/drhagen/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drhagen/scipy/downloads","issues_url":"https://api.github.com/repos/drhagen/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/drhagen/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/drhagen/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/drhagen/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drhagen/scipy/labels{/name}","releases_url":"https://api.github.com/repos/drhagen/scipy/releases{/id}","deployments_url":"https://api.github.com/repos/drhagen/scipy/deployments","created_at":"2016-08-12T12:02:39Z","updated_at":"2017-05-20T00:52:21Z","pushed_at":"2018-08-01T14:23:23Z","git_url":"git://github.com/drhagen/scipy.git","ssh_url":"git@github.com:drhagen/scipy.git","clone_url":"https://github.com/drhagen/scipy.git","svn_url":"https://github.com/drhagen/scipy","homepage":"","size":79133,"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,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scipy:master","ref":"master","sha":"6421d63071cffec769fa70025eb3c454fa986116","user":{"login":"scipy","id":288277,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4ODI3Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/288277?v=4","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"repo":{"id":1460385,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYwMzg1","name":"scipy","full_name":"scipy/scipy","owner":{"login":"scipy","id":288277,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4ODI3Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/288277?v=4","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scipy/scipy","description":"Scipy library main repository","fork":false,"url":"https://api.github.com/repos/scipy/scipy","forks_url":"https://api.github.com/repos/scipy/scipy/forks","keys_url":"https://api.github.com/repos/scipy/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scipy/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scipy/scipy/teams","hooks_url":"https://api.github.com/repos/scipy/scipy/hooks","issue_events_url":"https://api.github.com/repos/scipy/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/scipy/scipy/events","assignees_url":"https://api.github.com/repos/scipy/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/scipy/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/scipy/scipy/tags","blobs_url":"https://api.github.com/repos/scipy/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scipy/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scipy/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/scipy/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/scipy/scipy/languages","stargazers_url":"https://api.github.com/repos/scipy/scipy/stargazers","contributors_url":"https://api.github.com/repos/scipy/scipy/contributors","subscribers_url":"https://api.github.com/repos/scipy/scipy/subscribers","subscription_url":"https://api.github.com/repos/scipy/scipy/subscription","commits_url":"https://api.github.com/repos/scipy/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/scipy/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/scipy/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/scipy/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/scipy/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/scipy/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scipy/scipy/merges","archive_url":"https://api.github.com/repos/scipy/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scipy/scipy/downloads","issues_url":"https://api.github.com/repos/scipy/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/scipy/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/scipy/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/scipy/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scipy/scipy/labels{/name}","releases_url":"https://api.github.com/repos/scipy/scipy/releases{/id}","deployments_url":"https://api.github.com/repos/scipy/scipy/deployments","created_at":"2011-03-09T18:52:03Z","updated_at":"2018-08-02T14:11:06Z","pushed_at":"2018-08-01T19:26:09Z","git_url":"git://github.com/scipy/scipy.git","ssh_url":"git@github.com:scipy/scipy.git","clone_url":"https://github.com/scipy/scipy.git","svn_url":"https://github.com/scipy/scipy","homepage":"https://scipy.org/scipylib/","size":81133,"stargazers_count":4758,"watchers_count":4758,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2436,"mirror_url":null,"archived":false,"open_issues_count":1311,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2436,"open_issues":1311,"watchers":4758,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/9087"},"html":{"href":"https://github.com/scipy/scipy/pull/9087"},"issue":{"href":"https://api.github.com/repos/scipy/scipy/issues/9087"},"comments":{"href":"https://api.github.com/repos/scipy/scipy/issues/9087/comments"},"review_comments":{"href":"https://api.github.com/repos/scipy/scipy/pulls/9087/comments"},"review_comment":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scipy/scipy/pulls/9087/commits"},"statuses":{"href":"https://api.github.com/repos/scipy/scipy/statuses/0064ba7113ac2a0d778b926c56d1300dc995842d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"perimosocordiae"}}