{"action":"created","issue":{"url":"https://api.github.com/repos/blaze/odo/issues/387","labels_url":"https://api.github.com/repos/blaze/odo/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/blaze/odo/issues/387/comments","events_url":"https://api.github.com/repos/blaze/odo/issues/387/events","html_url":"https://github.com/blaze/odo/issues/387","id":123008547,"number":387,"title":"Bug in convert.py::list_to_numpy","user":{"login":"cowlicks","id":598099,"avatar_url":"https://avatars.githubusercontent.com/u/598099?v=3","gravatar_id":"","url":"https://api.github.com/users/cowlicks","html_url":"https://github.com/cowlicks","followers_url":"https://api.github.com/users/cowlicks/followers","following_url":"https://api.github.com/users/cowlicks/following{/other_user}","gists_url":"https://api.github.com/users/cowlicks/gists{/gist_id}","starred_url":"https://api.github.com/users/cowlicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowlicks/subscriptions","organizations_url":"https://api.github.com/users/cowlicks/orgs","repos_url":"https://api.github.com/users/cowlicks/repos","events_url":"https://api.github.com/users/cowlicks/events{/privacy}","received_events_url":"https://api.github.com/users/cowlicks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-18T19:09:40Z","updated_at":"2015-12-18T19:21:40Z","closed_at":null,"body":"```python\r\nfrom odo.convert import list_to_numpy\r\nfrom odo import dshape\r\n\r\ndef test_list_to_numpy():\r\n    dshp = dshape('11 * {x: {a: int64, b: int64}, y: float64}')\r\n    d = [({'a': 1, 'b': 2},  1.0),\r\n         ({'a': 2, 'b': 3},  2.0),\r\n         ({'a': 3, 'b': 4},  3.0)]\r\n    list_to_numpy(d, dshp)\r\n```\r\n\r\noutput\r\n\r\n```\r\n=================================== FAILURES ===================================\r\n______________________________ test_list_to_numpy ______________________________\r\n\r\n    def test_list_to_numpy():\r\n        dshp = dshape('11 * {x: {a: int64, b: int64}, y: float64}')\r\n        d = [({'a': 1, 'b': 2},  1.0),\r\n             ({'a': 2, 'b': 3},  2.0),\r\n             ({'a': 3, 'b': 4},  3.0)]\r\n>       list_to_numpy(d, dshp)\r\n\r\ntest_foo.py:9: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\n\r\nseq = [({'a': 1, 'b': 2}, 1.0), ({'a': 2, 'b': 3}, 2.0), ({'a': 3, 'b': 4}, 3.0)]\r\ndshape = dshape(\"11 * {x: {a: int64, b: int64}, y: float64}\"), kwargs = {}\r\n\r\n    @convert.register(np.ndarray, list, cost=10.0)\r\n    def list_to_numpy(seq, dshape=None, **kwargs):\r\n        if isinstance(element_of(seq), dict):\r\n            seq = list(records_to_tuples(dshape, seq))\r\n        if (seq and isinstance(seq[0], Iterable) and not ishashable(seq[0]) and\r\n                not isscalar(dshape)):\r\n            seq = list(map(tuple, seq))\r\n>       return np.array(seq, dtype=dshape_to_numpy(dshape))\r\nE       TypeError: a bytes-like object is required, not 'dict'\r\n```"},"comment":{"url":"https://api.github.com/repos/blaze/odo/issues/comments/165875717","html_url":"https://github.com/blaze/odo/issues/387#issuecomment-165875717","issue_url":"https://api.github.com/repos/blaze/odo/issues/387","id":165875717,"user":{"login":"cowlicks","id":598099,"avatar_url":"https://avatars.githubusercontent.com/u/598099?v=3","gravatar_id":"","url":"https://api.github.com/users/cowlicks","html_url":"https://github.com/cowlicks","followers_url":"https://api.github.com/users/cowlicks/followers","following_url":"https://api.github.com/users/cowlicks/following{/other_user}","gists_url":"https://api.github.com/users/cowlicks/gists{/gist_id}","starred_url":"https://api.github.com/users/cowlicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowlicks/subscriptions","organizations_url":"https://api.github.com/users/cowlicks/orgs","repos_url":"https://api.github.com/users/cowlicks/repos","events_url":"https://api.github.com/users/cowlicks/events{/privacy}","received_events_url":"https://api.github.com/users/cowlicks/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T19:21:39Z","updated_at":"2015-12-18T19:21:39Z","body":"I don't know what the output should look like? @llllllllll "}}