{"action":"created","issue":{"url":"https://api.github.com/repos/yosinski/deep-visualization-toolbox/issues/23","labels_url":"https://api.github.com/repos/yosinski/deep-visualization-toolbox/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/yosinski/deep-visualization-toolbox/issues/23/comments","events_url":"https://api.github.com/repos/yosinski/deep-visualization-toolbox/issues/23/events","html_url":"https://github.com/yosinski/deep-visualization-toolbox/issues/23","id":116676363,"number":23,"title":"Issue using numpy 1.10.1","user":{"login":"clibbon","id":11162807,"avatar_url":"https://avatars.githubusercontent.com/u/11162807?v=3","gravatar_id":"","url":"https://api.github.com/users/clibbon","html_url":"https://github.com/clibbon","followers_url":"https://api.github.com/users/clibbon/followers","following_url":"https://api.github.com/users/clibbon/following{/other_user}","gists_url":"https://api.github.com/users/clibbon/gists{/gist_id}","starred_url":"https://api.github.com/users/clibbon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clibbon/subscriptions","organizations_url":"https://api.github.com/users/clibbon/orgs","repos_url":"https://api.github.com/users/clibbon/repos","events_url":"https://api.github.com/users/clibbon/events{/privacy}","received_events_url":"https://api.github.com/users/clibbon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-13T00:52:09Z","updated_at":"2015-11-13T01:03:18Z","closed_at":null,"body":"Hi,\r\n\r\nI have the program up and running, however there are two functions affected which both return the error\r\n \r\n    TypeError: Cannot cast ufunc multiply output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'\r\n\r\nThis occurs when attempting to access the webcam (by pressing c), which reports:\r\n\r\n    Traceback (most recent call last):\r\n      File \"/usr/lib/python2.7/threading.py\", line 810, in __bootstrap_inner\r\n        self.run()\r\n      File \"/home/alex/Programs/deep-visualization-toolbox/core.py\", line 172, in run\r\n        frame_full = read_cam_frame(self.bound_cap_device)\r\n      File \"/home/alex/Programs/deep-visualization-toolbox/image_misc.py\", line 61, in read_cam_frame\r\n        frame *= (255.0 / (frame.max() + 1e-6))\r\n    TypeError: Cannot cast ufunc multiply output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'\r\n\r\nor by trying to access the list of help commands:\r\n\r\n    Traceback (most recent call last):\r\n      File \"./run_toolbox.py\", line 29, in <module>\r\n        main()\r\n      File \"./run_toolbox.py\", line 24, in main\r\n        lv.run_loop()\r\n      File \"/home/alex/Programs/deep-visualization-toolbox/core.py\", line 439, in run_loop\r\n        self.draw_help()\r\n      File \"/home/alex/Programs/deep-visualization-toolbox/core.py\", line 529, in draw_help\r\n        self.help_buffer[:] *= .7\r\n    TypeError: Cannot cast ufunc multiply output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'\r\n\r\nMy google efforts have churned out this thread on inplace type castings, which behave differently in earlier python versions and wouldn't throw up this error. https://github.com/numpy/numpy/issues/6198\r\n\r\nHave any other numpy 1.10.1 users had this problem?  \r\n\r\nThe parts I have running are amazing!"},"comment":{"url":"https://api.github.com/repos/yosinski/deep-visualization-toolbox/issues/comments/156285792","html_url":"https://github.com/yosinski/deep-visualization-toolbox/issues/23#issuecomment-156285792","issue_url":"https://api.github.com/repos/yosinski/deep-visualization-toolbox/issues/23","id":156285792,"user":{"login":"yosinski","id":501890,"avatar_url":"https://avatars.githubusercontent.com/u/501890?v=3","gravatar_id":"","url":"https://api.github.com/users/yosinski","html_url":"https://github.com/yosinski","followers_url":"https://api.github.com/users/yosinski/followers","following_url":"https://api.github.com/users/yosinski/following{/other_user}","gists_url":"https://api.github.com/users/yosinski/gists{/gist_id}","starred_url":"https://api.github.com/users/yosinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosinski/subscriptions","organizations_url":"https://api.github.com/users/yosinski/orgs","repos_url":"https://api.github.com/users/yosinski/repos","events_url":"https://api.github.com/users/yosinski/events{/privacy}","received_events_url":"https://api.github.com/users/yosinski/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T01:03:18Z","updated_at":"2015-11-13T01:03:18Z","body":"Hi @clibbon, I think you're exactly right about the reason; fortunately @lionleaf has posted a solution: #21. It hasn't been merged yet (waiting until after ICLR deadline), but can you give it a try and see it it works for you?\r\n\r\n"}}