{"action":"created","issue":{"url":"https://api.github.com/repos/adamlwgriffiths/Pyrr/issues/56","repository_url":"https://api.github.com/repos/adamlwgriffiths/Pyrr","labels_url":"https://api.github.com/repos/adamlwgriffiths/Pyrr/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/adamlwgriffiths/Pyrr/issues/56/comments","events_url":"https://api.github.com/repos/adamlwgriffiths/Pyrr/issues/56/events","html_url":"https://github.com/adamlwgriffiths/Pyrr/issues/56","id":240555353,"number":56,"title":"matrix44.create_look_at dtype not understood","user":{"login":"Korijn","id":1882046,"avatar_url":"https://avatars3.githubusercontent.com/u/1882046?v=3","gravatar_id":"","url":"https://api.github.com/users/Korijn","html_url":"https://github.com/Korijn","followers_url":"https://api.github.com/users/Korijn/followers","following_url":"https://api.github.com/users/Korijn/following{/other_user}","gists_url":"https://api.github.com/users/Korijn/gists{/gist_id}","starred_url":"https://api.github.com/users/Korijn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korijn/subscriptions","organizations_url":"https://api.github.com/users/Korijn/orgs","repos_url":"https://api.github.com/users/Korijn/repos","events_url":"https://api.github.com/users/Korijn/events{/privacy}","received_events_url":"https://api.github.com/users/Korijn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-05T06:56:26Z","updated_at":"2017-07-05T07:18:11Z","closed_at":null,"body":"It is a little surprising to me that this works:\r\n\r\n```\r\n>>> import pyrr\r\n>>> pyrr.matrix44.create_perspective_projection(45.0, 4.0/3.0, 0.1, 1000.0, dtype='f4')\r\narray([[ 1.81066012,  0.        ,  0.        ,  0.        ],\r\n       [ 0.        ,  2.41421366,  0.        ,  0.        ],\r\n       [ 0.        ,  0.        , -1.00020003, -1.        ],\r\n       [ 0.        ,  0.        , -0.20002   ,  0.        ]], dtype=float32)\r\n```\r\n\r\nBut that this does not:\r\n\r\n```\r\n>>> pyrr.matrix44.create_look_at([10, 10, 10], [0, 0, 0], [0, 1, 0], dtype='f4')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/media/ssd2/miniconda3/envs/radiant/lib/python3.6/site-packages/pyrr/utils.py\", line 25, in wrapper\r\n    return fn(*args, **kwargs)\r\n  File \"/media/ssd2/miniconda3/envs/radiant/lib/python3.6/site-packages/pyrr/matrix44.py\", line 473, in create_look_at\r\n    ), dtype=dtype)\r\nTypeError: data type not understood\r\n```\r\n\r\nIs that a bug?"},"comment":{"url":"https://api.github.com/repos/adamlwgriffiths/Pyrr/issues/comments/313022128","html_url":"https://github.com/adamlwgriffiths/Pyrr/issues/56#issuecomment-313022128","issue_url":"https://api.github.com/repos/adamlwgriffiths/Pyrr/issues/56","id":313022128,"user":{"login":"cprogrammer1994","id":11232402,"avatar_url":"https://avatars2.githubusercontent.com/u/11232402?v=3","gravatar_id":"","url":"https://api.github.com/users/cprogrammer1994","html_url":"https://github.com/cprogrammer1994","followers_url":"https://api.github.com/users/cprogrammer1994/followers","following_url":"https://api.github.com/users/cprogrammer1994/following{/other_user}","gists_url":"https://api.github.com/users/cprogrammer1994/gists{/gist_id}","starred_url":"https://api.github.com/users/cprogrammer1994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cprogrammer1994/subscriptions","organizations_url":"https://api.github.com/users/cprogrammer1994/orgs","repos_url":"https://api.github.com/users/cprogrammer1994/repos","events_url":"https://api.github.com/users/cprogrammer1994/events{/privacy}","received_events_url":"https://api.github.com/users/cprogrammer1994/received_events","type":"User","site_admin":false},"created_at":"2017-07-05T07:18:11Z","updated_at":"2017-07-05T07:18:11Z","body":"found the problem:\r\n\r\nall the functions with a decorator as follows are broken:\r\n\r\n```python\r\n@all_parameters_as_numpy_arrays\r\ndef foobar(*parameters, dtype=None):\r\n```\r\n\r\n`dtype` will be converted to a numpy array (`dtype <class 'numpy.ndarray'> f4`)\r\n\r\n@adamlwgriffiths should we patch the `all_parameters_as_numpy_arrays` to skip `dtype` or is there a better solution?"}}
{"actor":{"display_login":"cprogrammer1994"}}