{"action":"created","comment":{"url":"https://api.github.com/repos/convexopt/gpkit/pulls/comments/37071669","id":37071669,"diff_hunk":"@@ -85,6 +85,7 @@ def __init__(self, exps=None, cs=1, varlocsandkeys=None,\n                     units = cs[0]/cs[0].magnitude\n                     if units.dimensionless:\n                         cs = [c * ureg.dimensionless for c in cs]\n+                        units = ureg.dimensionless","path":"gpkit/nomials.py","position":4,"original_position":4,"commit_id":"48e48f1d7b67e74a1e13ddd78ccf749c49bcd5dc","original_commit_id":"48e48f1d7b67e74a1e13ddd78ccf749c49bcd5dc","user":{"login":"whoburg","id":6042395,"avatar_url":"https://avatars.githubusercontent.com/u/6042395?v=3","gravatar_id":"","url":"https://api.github.com/users/whoburg","html_url":"https://github.com/whoburg","followers_url":"https://api.github.com/users/whoburg/followers","following_url":"https://api.github.com/users/whoburg/following{/other_user}","gists_url":"https://api.github.com/users/whoburg/gists{/gist_id}","starred_url":"https://api.github.com/users/whoburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whoburg/subscriptions","organizations_url":"https://api.github.com/users/whoburg/orgs","repos_url":"https://api.github.com/users/whoburg/repos","events_url":"https://api.github.com/users/whoburg/events{/privacy}","received_events_url":"https://api.github.com/users/whoburg/received_events","type":"User","site_admin":false},"body":"Should we use pint's `to` method instead of growing our own?\r\n\r\n```python\r\nIn [3]: ureg = pint.UnitRegistry()\r\n\r\nIn [4]: x = 3 * ureg.feet\r\n\r\nIn [5]: x\r\nOut[5]: <Quantity(3, 'foot')>\r\n\r\nIn [6]: y = 1 * ureg.meter\r\n\r\nIn [7]: x/y\r\nOut[7]: <Quantity(3.0, 'foot / meter')>\r\n\r\nIn [8]: (x/y).to(ureg.dimensionless)\r\nOut[8]: <Quantity(0.9144, 'dimensionless')>\r\n```\r\n\r\n(I've barely played with pint; feel free to tell me this is a bad idea.)","created_at":"2015-08-14T12:31:51Z","updated_at":"2015-08-14T12:31:51Z","html_url":"https://github.com/convexopt/gpkit/pull/339#discussion_r37071669","pull_request_url":"https://api.github.com/repos/convexopt/gpkit/pulls/339","_links":{"self":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/comments/37071669"},"html":{"href":"https://github.com/convexopt/gpkit/pull/339#discussion_r37071669"},"pull_request":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/339"}}},"pull_request":{"url":"https://api.github.com/repos/convexopt/gpkit/pulls/339","id":42383559,"html_url":"https://github.com/convexopt/gpkit/pull/339","diff_url":"https://github.com/convexopt/gpkit/pull/339.diff","patch_url":"https://github.com/convexopt/gpkit/pull/339.patch","issue_url":"https://api.github.com/repos/convexopt/gpkit/issues/339","number":339,"state":"closed","locked":false,"title":"fix #338","user":{"login":"bqpd","id":1482776,"avatar_url":"https://avatars.githubusercontent.com/u/1482776?v=3","gravatar_id":"","url":"https://api.github.com/users/bqpd","html_url":"https://github.com/bqpd","followers_url":"https://api.github.com/users/bqpd/followers","following_url":"https://api.github.com/users/bqpd/following{/other_user}","gists_url":"https://api.github.com/users/bqpd/gists{/gist_id}","starred_url":"https://api.github.com/users/bqpd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bqpd/subscriptions","organizations_url":"https://api.github.com/users/bqpd/orgs","repos_url":"https://api.github.com/users/bqpd/repos","events_url":"https://api.github.com/users/bqpd/events{/privacy}","received_events_url":"https://api.github.com/users/bqpd/received_events","type":"User","site_admin":false},"body":"fix #338","created_at":"2015-08-13T18:36:17Z","updated_at":"2015-08-14T12:31:51Z","closed_at":"2015-08-14T02:32:14Z","merged_at":"2015-08-14T02:32:14Z","merge_commit_sha":"b62b23ed0b3666180e55f2103affbaac705a4f9c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/convexopt/gpkit/pulls/339/commits","review_comments_url":"https://api.github.com/repos/convexopt/gpkit/pulls/339/comments","review_comment_url":"https://api.github.com/repos/convexopt/gpkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/convexopt/gpkit/issues/339/comments","statuses_url":"https://api.github.com/repos/convexopt/gpkit/statuses/48e48f1d7b67e74a1e13ddd78ccf749c49bcd5dc","head":{"label":"convexopt:monoequnits","ref":"monoequnits","sha":"48e48f1d7b67e74a1e13ddd78ccf749c49bcd5dc","user":{"login":"convexopt","id":7919400,"avatar_url":"https://avatars.githubusercontent.com/u/7919400?v=3","gravatar_id":"","url":"https://api.github.com/users/convexopt","html_url":"https://github.com/convexopt","followers_url":"https://api.github.com/users/convexopt/followers","following_url":"https://api.github.com/users/convexopt/following{/other_user}","gists_url":"https://api.github.com/users/convexopt/gists{/gist_id}","starred_url":"https://api.github.com/users/convexopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convexopt/subscriptions","organizations_url":"https://api.github.com/users/convexopt/orgs","repos_url":"https://api.github.com/users/convexopt/repos","events_url":"https://api.github.com/users/convexopt/events{/privacy}","received_events_url":"https://api.github.com/users/convexopt/received_events","type":"Organization","site_admin":false},"repo":{"id":20954246,"name":"gpkit","full_name":"convexopt/gpkit","owner":{"login":"convexopt","id":7919400,"avatar_url":"https://avatars.githubusercontent.com/u/7919400?v=3","gravatar_id":"","url":"https://api.github.com/users/convexopt","html_url":"https://github.com/convexopt","followers_url":"https://api.github.com/users/convexopt/followers","following_url":"https://api.github.com/users/convexopt/following{/other_user}","gists_url":"https://api.github.com/users/convexopt/gists{/gist_id}","starred_url":"https://api.github.com/users/convexopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convexopt/subscriptions","organizations_url":"https://api.github.com/users/convexopt/orgs","repos_url":"https://api.github.com/users/convexopt/repos","events_url":"https://api.github.com/users/convexopt/events{/privacy}","received_events_url":"https://api.github.com/users/convexopt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/convexopt/gpkit","description":"Python package for defining and manipulating geometric programming models.","fork":false,"url":"https://api.github.com/repos/convexopt/gpkit","forks_url":"https://api.github.com/repos/convexopt/gpkit/forks","keys_url":"https://api.github.com/repos/convexopt/gpkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/convexopt/gpkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/convexopt/gpkit/teams","hooks_url":"https://api.github.com/repos/convexopt/gpkit/hooks","issue_events_url":"https://api.github.com/repos/convexopt/gpkit/issues/events{/number}","events_url":"https://api.github.com/repos/convexopt/gpkit/events","assignees_url":"https://api.github.com/repos/convexopt/gpkit/assignees{/user}","branches_url":"https://api.github.com/repos/convexopt/gpkit/branches{/branch}","tags_url":"https://api.github.com/repos/convexopt/gpkit/tags","blobs_url":"https://api.github.com/repos/convexopt/gpkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/convexopt/gpkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/convexopt/gpkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/convexopt/gpkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/convexopt/gpkit/statuses/{sha}","languages_url":"https://api.github.com/repos/convexopt/gpkit/languages","stargazers_url":"https://api.github.com/repos/convexopt/gpkit/stargazers","contributors_url":"https://api.github.com/repos/convexopt/gpkit/contributors","subscribers_url":"https://api.github.com/repos/convexopt/gpkit/subscribers","subscription_url":"https://api.github.com/repos/convexopt/gpkit/subscription","commits_url":"https://api.github.com/repos/convexopt/gpkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/convexopt/gpkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/convexopt/gpkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/convexopt/gpkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/convexopt/gpkit/contents/{+path}","compare_url":"https://api.github.com/repos/convexopt/gpkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/convexopt/gpkit/merges","archive_url":"https://api.github.com/repos/convexopt/gpkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/convexopt/gpkit/downloads","issues_url":"https://api.github.com/repos/convexopt/gpkit/issues{/number}","pulls_url":"https://api.github.com/repos/convexopt/gpkit/pulls{/number}","milestones_url":"https://api.github.com/repos/convexopt/gpkit/milestones{/number}","notifications_url":"https://api.github.com/repos/convexopt/gpkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/convexopt/gpkit/labels{/name}","releases_url":"https://api.github.com/repos/convexopt/gpkit/releases{/id}","created_at":"2014-06-18T08:04:06Z","updated_at":"2015-08-06T09:55:33Z","pushed_at":"2015-08-14T06:08:04Z","git_url":"git://github.com/convexopt/gpkit.git","ssh_url":"git@github.com:convexopt/gpkit.git","clone_url":"https://github.com/convexopt/gpkit.git","svn_url":"https://github.com/convexopt/gpkit","homepage":"http://gpkit.readthedocs.org","size":30341,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":46,"forks":2,"open_issues":46,"watchers":6,"default_branch":"master"}},"base":{"label":"convexopt:master","ref":"master","sha":"4baa15361c77e07ea615e2a4763165531992c530","user":{"login":"convexopt","id":7919400,"avatar_url":"https://avatars.githubusercontent.com/u/7919400?v=3","gravatar_id":"","url":"https://api.github.com/users/convexopt","html_url":"https://github.com/convexopt","followers_url":"https://api.github.com/users/convexopt/followers","following_url":"https://api.github.com/users/convexopt/following{/other_user}","gists_url":"https://api.github.com/users/convexopt/gists{/gist_id}","starred_url":"https://api.github.com/users/convexopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convexopt/subscriptions","organizations_url":"https://api.github.com/users/convexopt/orgs","repos_url":"https://api.github.com/users/convexopt/repos","events_url":"https://api.github.com/users/convexopt/events{/privacy}","received_events_url":"https://api.github.com/users/convexopt/received_events","type":"Organization","site_admin":false},"repo":{"id":20954246,"name":"gpkit","full_name":"convexopt/gpkit","owner":{"login":"convexopt","id":7919400,"avatar_url":"https://avatars.githubusercontent.com/u/7919400?v=3","gravatar_id":"","url":"https://api.github.com/users/convexopt","html_url":"https://github.com/convexopt","followers_url":"https://api.github.com/users/convexopt/followers","following_url":"https://api.github.com/users/convexopt/following{/other_user}","gists_url":"https://api.github.com/users/convexopt/gists{/gist_id}","starred_url":"https://api.github.com/users/convexopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convexopt/subscriptions","organizations_url":"https://api.github.com/users/convexopt/orgs","repos_url":"https://api.github.com/users/convexopt/repos","events_url":"https://api.github.com/users/convexopt/events{/privacy}","received_events_url":"https://api.github.com/users/convexopt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/convexopt/gpkit","description":"Python package for defining and manipulating geometric programming models.","fork":false,"url":"https://api.github.com/repos/convexopt/gpkit","forks_url":"https://api.github.com/repos/convexopt/gpkit/forks","keys_url":"https://api.github.com/repos/convexopt/gpkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/convexopt/gpkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/convexopt/gpkit/teams","hooks_url":"https://api.github.com/repos/convexopt/gpkit/hooks","issue_events_url":"https://api.github.com/repos/convexopt/gpkit/issues/events{/number}","events_url":"https://api.github.com/repos/convexopt/gpkit/events","assignees_url":"https://api.github.com/repos/convexopt/gpkit/assignees{/user}","branches_url":"https://api.github.com/repos/convexopt/gpkit/branches{/branch}","tags_url":"https://api.github.com/repos/convexopt/gpkit/tags","blobs_url":"https://api.github.com/repos/convexopt/gpkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/convexopt/gpkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/convexopt/gpkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/convexopt/gpkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/convexopt/gpkit/statuses/{sha}","languages_url":"https://api.github.com/repos/convexopt/gpkit/languages","stargazers_url":"https://api.github.com/repos/convexopt/gpkit/stargazers","contributors_url":"https://api.github.com/repos/convexopt/gpkit/contributors","subscribers_url":"https://api.github.com/repos/convexopt/gpkit/subscribers","subscription_url":"https://api.github.com/repos/convexopt/gpkit/subscription","commits_url":"https://api.github.com/repos/convexopt/gpkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/convexopt/gpkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/convexopt/gpkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/convexopt/gpkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/convexopt/gpkit/contents/{+path}","compare_url":"https://api.github.com/repos/convexopt/gpkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/convexopt/gpkit/merges","archive_url":"https://api.github.com/repos/convexopt/gpkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/convexopt/gpkit/downloads","issues_url":"https://api.github.com/repos/convexopt/gpkit/issues{/number}","pulls_url":"https://api.github.com/repos/convexopt/gpkit/pulls{/number}","milestones_url":"https://api.github.com/repos/convexopt/gpkit/milestones{/number}","notifications_url":"https://api.github.com/repos/convexopt/gpkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/convexopt/gpkit/labels{/name}","releases_url":"https://api.github.com/repos/convexopt/gpkit/releases{/id}","created_at":"2014-06-18T08:04:06Z","updated_at":"2015-08-06T09:55:33Z","pushed_at":"2015-08-14T06:08:04Z","git_url":"git://github.com/convexopt/gpkit.git","ssh_url":"git@github.com:convexopt/gpkit.git","clone_url":"https://github.com/convexopt/gpkit.git","svn_url":"https://github.com/convexopt/gpkit","homepage":"http://gpkit.readthedocs.org","size":30341,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":46,"forks":2,"open_issues":46,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/339"},"html":{"href":"https://github.com/convexopt/gpkit/pull/339"},"issue":{"href":"https://api.github.com/repos/convexopt/gpkit/issues/339"},"comments":{"href":"https://api.github.com/repos/convexopt/gpkit/issues/339/comments"},"review_comments":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/339/comments"},"review_comment":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/339/commits"},"statuses":{"href":"https://api.github.com/repos/convexopt/gpkit/statuses/48e48f1d7b67e74a1e13ddd78ccf749c49bcd5dc"}}}}