{"action":"created","issue":{"url":"https://api.github.com/repos/kwgoodman/bottleneck/issues/127","repository_url":"https://api.github.com/repos/kwgoodman/bottleneck","labels_url":"https://api.github.com/repos/kwgoodman/bottleneck/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/kwgoodman/bottleneck/issues/127/comments","events_url":"https://api.github.com/repos/kwgoodman/bottleneck/issues/127/events","html_url":"https://github.com/kwgoodman/bottleneck/issues/127","id":160448533,"number":127,"title":"Should we port bottleneck to C?","user":{"login":"kwgoodman","id":299024,"avatar_url":"https://avatars.githubusercontent.com/u/299024?v=3","gravatar_id":"","url":"https://api.github.com/users/kwgoodman","html_url":"https://github.com/kwgoodman","followers_url":"https://api.github.com/users/kwgoodman/followers","following_url":"https://api.github.com/users/kwgoodman/following{/other_user}","gists_url":"https://api.github.com/users/kwgoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/kwgoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwgoodman/subscriptions","organizations_url":"https://api.github.com/users/kwgoodman/orgs","repos_url":"https://api.github.com/users/kwgoodman/repos","events_url":"https://api.github.com/users/kwgoodman/events{/privacy}","received_events_url":"https://api.github.com/users/kwgoodman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-06-15T15:15:44Z","updated_at":"2016-07-21T01:12:10Z","closed_at":null,"body":"I'm trying to port nansum to C (without using cython) to get a feel for how bottleneck would look written in pure C.\r\n\r\nWhat I have so far (in the c_rewrite branch) is a nansum with reduced features that compiles but does not work at all. I have not yet tried to deal with reference counting because I don't yet know how. Any help, comments, appreciated.\r\n\r\nHere's a demo on how to compile:\r\n```\r\n/bottleneck/bottleneck/template (c_rewrite)$ python setup.py build_ext --inplace\r\nrunning build_ext\r\nbuilding 'nansum' extension\r\n<snip>\r\nIn [1]: from nansum import nansum\r\nIn [2]: a=np.random.rand(4)\r\nIn [3]: nansum(a)\r\n---------------------------------------------------------------------------\r\nSystemError                               Traceback (most recent call last)\r\n<ipython-input-3-1d96a990bfd9> in <module>()\r\n----> 1 nansum(a)\r\n\r\nSystemError: error return without exception set\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kwgoodman/bottleneck/issues/comments/234129892","html_url":"https://github.com/kwgoodman/bottleneck/issues/127#issuecomment-234129892","issue_url":"https://api.github.com/repos/kwgoodman/bottleneck/issues/127","id":234129892,"user":{"login":"jennolsen84","id":10360673,"avatar_url":"https://avatars.githubusercontent.com/u/10360673?v=3","gravatar_id":"","url":"https://api.github.com/users/jennolsen84","html_url":"https://github.com/jennolsen84","followers_url":"https://api.github.com/users/jennolsen84/followers","following_url":"https://api.github.com/users/jennolsen84/following{/other_user}","gists_url":"https://api.github.com/users/jennolsen84/gists{/gist_id}","starred_url":"https://api.github.com/users/jennolsen84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennolsen84/subscriptions","organizations_url":"https://api.github.com/users/jennolsen84/orgs","repos_url":"https://api.github.com/users/jennolsen84/repos","events_url":"https://api.github.com/users/jennolsen84/events{/privacy}","received_events_url":"https://api.github.com/users/jennolsen84/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T01:12:10Z","updated_at":"2016-07-21T01:12:10Z","body":"examining the code, I noticed the following:\r\n\r\nhttps://github.com/kwgoodman/bottleneck/blob/3a19961c71bee9b701f9c21b079b6317860ba8db/bottleneck/src/move2_template.c#L54 , can the `PID(ita)` calls be moved out of the loop?  Seems like they are a constant.  There is a chance that the compiler can do this, but I have a feeling that the compiler will not have enough information to assume that (since numpy is compiled in a separate module).\r\n\r\n"}}
{"actor":{"display_login":"jennolsen84"}}