{"action":"created","issue":{"url":"https://api.github.com/repos/numba/numba/issues/1532","labels_url":"https://api.github.com/repos/numba/numba/issues/1532/labels{/name}","comments_url":"https://api.github.com/repos/numba/numba/issues/1532/comments","events_url":"https://api.github.com/repos/numba/numba/issues/1532/events","html_url":"https://github.com/numba/numba/issues/1532","id":117007544,"number":1532,"title":"@guvectorize missing namespace variables in nopython mode","user":{"login":"richardotis","id":6405510,"avatar_url":"https://avatars.githubusercontent.com/u/6405510?v=3","gravatar_id":"","url":"https://api.github.com/users/richardotis","html_url":"https://github.com/richardotis","followers_url":"https://api.github.com/users/richardotis/followers","following_url":"https://api.github.com/users/richardotis/following{/other_user}","gists_url":"https://api.github.com/users/richardotis/gists{/gist_id}","starred_url":"https://api.github.com/users/richardotis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardotis/subscriptions","organizations_url":"https://api.github.com/users/richardotis/orgs","repos_url":"https://api.github.com/users/richardotis/repos","events_url":"https://api.github.com/users/richardotis/events{/privacy}","received_events_url":"https://api.github.com/users/richardotis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-15T17:52:24Z","updated_at":"2015-11-15T17:55:25Z","closed_at":null,"body":"```python\r\nimport numba\r\nimport numpy as np\r\nexternal = lambda *args: np.sum(args)\r\n\r\n@numba.guvectorize(['float64[:], float64[:]'], '(n)->(n)', nopython=False)\r\ndef func(args, result):\r\n    result[:] = external(args)\r\n\r\nresult = np.empty((1,1))\r\nfunc(np.ones((1,1)), result)\r\nprint(result)\r\n```\r\n```\r\n[[ 1.]]\r\n```\r\n\r\nThe only change is we turn on nopython mode.\r\n\r\n```python\r\nimport numba\r\nimport numpy as np\r\nexternal = lambda *args: np.sum(args)\r\n\r\n@numba.guvectorize(['float64[:], float64[:]'], '(n)->(n)', nopython=True)\r\ndef func(args, result):\r\n    result[:] = external(args)\r\n\r\nresult = np.empty((1,1))\r\nfunc(np.ones((1,1)), result)\r\nprint(result)\r\n```\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/rotis/anaconda/envs/calphad/lib/python2.7/site-packages/numba/compiler.py\", line 243, in run\r\n    res = stage()\r\n  File \"/home/rotis/anaconda/envs/calphad/lib/python2.7/site-packages/numba/compiler.py\", line 458, in stage_nopython_frontend\r\n    self.locals)\r\n  File \"/home/rotis/anaconda/envs/calphad/lib/python2.7/site-packages/numba/compiler.py\", line 758, in type_inference_stage\r\n    infer.build_constraint()\r\n  File \"/home/rotis/anaconda/envs/calphad/lib/python2.7/site-packages/numba/typeinfer.py\", line 494, in build_constraint\r\n    self.constrain_statement(inst)\r\n  File \"/home/rotis/anaconda/envs/calphad/lib/python2.7/site-packages/numba/typeinfer.py\", line 651, in constrain_statement\r\n    self.typeof_assign(inst)\r\n  File \"/home/rotis/anaconda/envs/calphad/lib/python2.7/site-packages/numba/typeinfer.py\", line 691, in typeof_assign\r\n    self.typeof_global(inst, inst.target, value)\r\n  File \"/home/rotis/anaconda/envs/calphad/lib/python2.7/site-packages/numba/typeinfer.py\", line 756, in typeof_global\r\n    loc=inst.loc)\r\nTypingError: Untyped global name 'external'\r\nFile \"<ipython-input-20-8b7d439406ad>\", line 7\r\n```"},"comment":{"url":"https://api.github.com/repos/numba/numba/issues/comments/156838822","html_url":"https://github.com/numba/numba/issues/1532#issuecomment-156838822","issue_url":"https://api.github.com/repos/numba/numba/issues/1532","id":156838822,"user":{"login":"richardotis","id":6405510,"avatar_url":"https://avatars.githubusercontent.com/u/6405510?v=3","gravatar_id":"","url":"https://api.github.com/users/richardotis","html_url":"https://github.com/richardotis","followers_url":"https://api.github.com/users/richardotis/followers","following_url":"https://api.github.com/users/richardotis/following{/other_user}","gists_url":"https://api.github.com/users/richardotis/gists{/gist_id}","starred_url":"https://api.github.com/users/richardotis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardotis/subscriptions","organizations_url":"https://api.github.com/users/richardotis/orgs","repos_url":"https://api.github.com/users/richardotis/repos","events_url":"https://api.github.com/users/richardotis/events{/privacy}","received_events_url":"https://api.github.com/users/richardotis/received_events","type":"User","site_admin":false},"created_at":"2015-11-15T17:55:25Z","updated_at":"2015-11-15T17:55:25Z","body":"This has something to do with callables because if I change `external` to a tuple of float I can access those values in nopython mode fine."}}