{"action":"created","issue":{"url":"https://api.github.com/repos/numba/numba/issues/1667","labels_url":"https://api.github.com/repos/numba/numba/issues/1667/labels{/name}","comments_url":"https://api.github.com/repos/numba/numba/issues/1667/comments","events_url":"https://api.github.com/repos/numba/numba/issues/1667/events","html_url":"https://github.com/numba/numba/issues/1667","id":129135526,"number":1667,"title":"np.angle() fails on arrays","user":{"login":"pitrou","id":1721820,"avatar_url":"https://avatars.githubusercontent.com/u/1721820?v=3","gravatar_id":"","url":"https://api.github.com/users/pitrou","html_url":"https://github.com/pitrou","followers_url":"https://api.github.com/users/pitrou/followers","following_url":"https://api.github.com/users/pitrou/following{/other_user}","gists_url":"https://api.github.com/users/pitrou/gists{/gist_id}","starred_url":"https://api.github.com/users/pitrou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitrou/subscriptions","organizations_url":"https://api.github.com/users/pitrou/orgs","repos_url":"https://api.github.com/users/pitrou/repos","events_url":"https://api.github.com/users/pitrou/events{/privacy}","received_events_url":"https://api.github.com/users/pitrou/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/numba/numba/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T13:00:18Z","updated_at":"2016-01-27T13:01:07Z","closed_at":null,"body":"```\r\n>>> from numba import jit\r\n>>> @jit(nopython=True)\r\n   ...: def angle(x): return np.angle(x)\r\n   ...: \r\n>>> \r\n>>> angle(np.complex128([1+1j]))\r\nTraceback (most recent call last):\r\n  File \"<ipython-input-6-186e6f934ae3>\", line 1, in <module>\r\n    angle(np.complex128([1+1j]))\r\n  File \"/home/antoine/numba/numba/dispatcher.py\", line 171, in _compile_for_args\r\n    return self.compile(sig)\r\n  File \"/home/antoine/numba/numba/dispatcher.py\", line 349, in compile\r\n    flags=flags, locals=self.locals)\r\n  File \"/home/antoine/numba/numba/compiler.py\", line 684, in compile_extra\r\n    return pipeline.compile_extra(func)\r\n  File \"/home/antoine/numba/numba/compiler.py\", line 372, in compile_extra\r\n    return self.compile_bytecode(bc, func_attr=self.func_attr)\r\n  File \"/home/antoine/numba/numba/compiler.py\", line 381, in compile_bytecode\r\n    return self._compile_bytecode()\r\n  File \"/home/antoine/numba/numba/compiler.py\", line 665, in _compile_bytecode\r\n    res = pm.run(self.status)\r\n  File \"/home/antoine/numba/numba/compiler.py\", line 251, in run\r\n    raise patched_exception\r\n  File \"/home/antoine/numba/numba/compiler.py\", line 243, in run\r\n    stage()\r\n  File \"/home/antoine/numba/numba/compiler.py\", line 469, in stage_nopython_frontend\r\n    self.locals)\r\n  File \"/home/antoine/numba/numba/compiler.py\", line 799, in type_inference_stage\r\n    infer.propagate()\r\n  File \"/home/antoine/numba/numba/typeinfer.py\", line 565, in propagate\r\n    raise errors[0]\r\nTypingError: Internal error at <numba.typeinfer.CallConstraint object at 0x7fa910005470>:\r\n--%<-----------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/antoine/numba/numba/typeinfer.py\", line 111, in propagate\r\n    constraint(typeinfer)\r\n  File \"/home/antoine/numba/numba/typeinfer.py\", line 284, in __call__\r\n    self.resolve(typeinfer, typevars, fnty)\r\n  File \"/home/antoine/numba/numba/typeinfer.py\", line 311, in resolve\r\n    sig = context.resolve_function_type(fnty, pos_args, kw_args)\r\n  File \"/home/antoine/numba/numba/typing/context.py\", line 123, in resolve_function_type\r\n    return func.get_call_type(self, args, kws)\r\n  File \"/home/antoine/numba/numba/types.py\", line 264, in get_call_type\r\n    sig = temp.apply(args, kws)\r\n  File \"/home/antoine/numba/numba/typing/templates.py\", line 229, in apply\r\n    sig = typer(*args, **kws)\r\n  File \"/home/antoine/numba/numba/typing/npydecl.py\", line 850, in typer\r\n    return ref.copy(dtype=ref.underlying_float)\r\nAttributeError: 'Array' object has no attribute 'underlying_float'\r\n--%<-----------------------------------------------------------------\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/numba/numba/issues/comments/175607191","html_url":"https://github.com/numba/numba/issues/1667#issuecomment-175607191","issue_url":"https://api.github.com/repos/numba/numba/issues/1667","id":175607191,"user":{"login":"pitrou","id":1721820,"avatar_url":"https://avatars.githubusercontent.com/u/1721820?v=3","gravatar_id":"","url":"https://api.github.com/users/pitrou","html_url":"https://github.com/pitrou","followers_url":"https://api.github.com/users/pitrou/followers","following_url":"https://api.github.com/users/pitrou/following{/other_user}","gists_url":"https://api.github.com/users/pitrou/gists{/gist_id}","starred_url":"https://api.github.com/users/pitrou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitrou/subscriptions","organizations_url":"https://api.github.com/users/pitrou/orgs","repos_url":"https://api.github.com/users/pitrou/repos","events_url":"https://api.github.com/users/pitrou/events{/privacy}","received_events_url":"https://api.github.com/users/pitrou/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T13:01:07Z","updated_at":"2016-01-27T13:01:07Z","body":"np.sinc() may suffer from the same problem, given its tests in `numba.tests.test_np_functions` are written in the same way."}}