{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/10382","labels_url":"https://api.github.com/repos/pydata/pandas/issues/10382/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/10382/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/10382/events","html_url":"https://github.com/pydata/pandas/issues/10382","id":89118179,"number":10382,"title":"Incorrect usage of float16 in algos.pyx","user":{"login":"FelipeLema","id":1232306,"avatar_url":"https://avatars.githubusercontent.com/u/1232306?v=3","gravatar_id":"","url":"https://api.github.com/users/FelipeLema","html_url":"https://github.com/FelipeLema","followers_url":"https://api.github.com/users/FelipeLema/followers","following_url":"https://api.github.com/users/FelipeLema/following{/other_user}","gists_url":"https://api.github.com/users/FelipeLema/gists{/gist_id}","starred_url":"https://api.github.com/users/FelipeLema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FelipeLema/subscriptions","organizations_url":"https://api.github.com/users/FelipeLema/orgs","repos_url":"https://api.github.com/users/FelipeLema/repos","events_url":"https://api.github.com/users/FelipeLema/events{/privacy}","received_events_url":"https://api.github.com/users/FelipeLema/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Dtypes","name":"Dtypes","color":"e102d8"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Needs%20Discussion","name":"Needs Discussion","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-17T20:29:14Z","updated_at":"2015-06-18T15:11:06Z","closed_at":null,"body":"Hi, everyone\r\n\r\nAccording to [documentation](http://docs.scipy.org/doc/numpy-dev/reference/c-api.coremath.html#half-precision-functions), `np.float16` should **not** be used in C code as it is right now in pandas/algos.pyx:38 (assigning `np.NINF` to a `np.float16` container in \"cython-eventually-converted-to-C\" code \r\n\r\nAs a matter of fact, when this value/variable is exposed, it is exposed as `0.0`, and not `-inf`, either in C/C++ while using gdb or even with python.\r\n\r\nSince `MINfloat6` it is not being used in all pandas code, I recommend eliminating this line and/or commentating the reason. I tried by using `np.float16(np.NINF)` but the problem is that a correct C `-inf` value is **still** being C-assigned to a please-don't-use-C-container.\r\n\r\nWhy is it that this is important to me/I got to find this error? I'm dealing with 3rd party code so I cannot get a configuration that allows me to do this assignment without raising SIGFPE.\r\n\r\nNo pull request? The two possible solutions to me is either using cython-kept-as-python code with just this variable (which would impact performance) or simply not using it at all. I think I don't have the authority for either."},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/113188108","html_url":"https://github.com/pydata/pandas/issues/10382#issuecomment-113188108","issue_url":"https://api.github.com/repos/pydata/pandas/issues/10382","id":113188108,"user":{"login":"FelipeLema","id":1232306,"avatar_url":"https://avatars.githubusercontent.com/u/1232306?v=3","gravatar_id":"","url":"https://api.github.com/users/FelipeLema","html_url":"https://github.com/FelipeLema","followers_url":"https://api.github.com/users/FelipeLema/followers","following_url":"https://api.github.com/users/FelipeLema/following{/other_user}","gists_url":"https://api.github.com/users/FelipeLema/gists{/gist_id}","starred_url":"https://api.github.com/users/FelipeLema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FelipeLema/subscriptions","organizations_url":"https://api.github.com/users/FelipeLema/orgs","repos_url":"https://api.github.com/users/FelipeLema/repos","events_url":"https://api.github.com/users/FelipeLema/events{/privacy}","received_events_url":"https://api.github.com/users/FelipeLema/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T15:11:06Z","updated_at":"2015-06-18T15:11:06Z","body":"This is definately a duplicate of #10046. I just added another insight and a link to numpy's documentation."}}