{"action":"created","issue":{"url":"https://api.github.com/repos/dwavesystems/dimod/issues/264","repository_url":"https://api.github.com/repos/dwavesystems/dimod","labels_url":"https://api.github.com/repos/dwavesystems/dimod/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/dwavesystems/dimod/issues/264/comments","events_url":"https://api.github.com/repos/dwavesystems/dimod/issues/264/events","html_url":"https://github.com/dwavesystems/dimod/issues/264","id":352348112,"node_id":"MDU6SXNzdWUzNTIzNDgxMTI=","number":264,"title":"Inconsistent BQM.to_* methods signatures","user":{"login":"randomir","id":447371,"node_id":"MDQ6VXNlcjQ0NzM3MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/447371?v=4","gravatar_id":"","url":"https://api.github.com/users/randomir","html_url":"https://github.com/randomir","followers_url":"https://api.github.com/users/randomir/followers","following_url":"https://api.github.com/users/randomir/following{/other_user}","gists_url":"https://api.github.com/users/randomir/gists{/gist_id}","starred_url":"https://api.github.com/users/randomir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randomir/subscriptions","organizations_url":"https://api.github.com/users/randomir/orgs","repos_url":"https://api.github.com/users/randomir/repos","events_url":"https://api.github.com/users/randomir/events{/privacy}","received_events_url":"https://api.github.com/users/randomir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-21T01:03:53Z","updated_at":"2018-08-21T18:48:26Z","closed_at":null,"author_association":"MEMBER","body":"[`BQM.to_coo`](https://github.com/dwavesystems/dimod/blob/67f88fd545767cf999bf86e86bf93489f3a503b9/dimod/binary_quadratic_model.py#L1394) accepts file handle, while none of the other serialization methods do (`to_json`, `to_bson`, `to_serializable`).\r\n"},"comment":{"url":"https://api.github.com/repos/dwavesystems/dimod/issues/comments/414781985","html_url":"https://github.com/dwavesystems/dimod/issues/264#issuecomment-414781985","issue_url":"https://api.github.com/repos/dwavesystems/dimod/issues/264","id":414781985,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDc4MTk4NQ==","user":{"login":"randomir","id":447371,"node_id":"MDQ6VXNlcjQ0NzM3MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/447371?v=4","gravatar_id":"","url":"https://api.github.com/users/randomir","html_url":"https://github.com/randomir","followers_url":"https://api.github.com/users/randomir/followers","following_url":"https://api.github.com/users/randomir/following{/other_user}","gists_url":"https://api.github.com/users/randomir/gists{/gist_id}","starred_url":"https://api.github.com/users/randomir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randomir/subscriptions","organizations_url":"https://api.github.com/users/randomir/orgs","repos_url":"https://api.github.com/users/randomir/repos","events_url":"https://api.github.com/users/randomir/events{/privacy}","received_events_url":"https://api.github.com/users/randomir/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T18:48:26Z","updated_at":"2018-08-21T18:48:26Z","author_association":"MEMBER","body":"It's minor consistency issue, more of a [pythonic-or-not](https://zen-of-python.info/there-should-be-one-and-preferably-only-one-obvious-way-to-do-it.html#13) kind of:\r\n```\r\n        if fmt == 'coo':\r\n            bqm.to_coo(fp)\r\n            # or\r\n            fp.write(bqm.to_coo())\r\n        elif fmt == 'json':\r\n            fp.write(bqm.to_json())\r\n```\r\n"}}
{"actor":{"display_login":"randomir"}}