Incorrect usage of float16 in algos.pyx #10382
Labels
Dtype Conversions
Unexpected or buggy dtype conversions
Needs Discussion
Requires discussion from core team before further action
Numeric Operations
Arithmetic, Comparison, and Logical operations
Hi, everyone
According to documentation,
np.float16
should not be used in C code as it is right now in pandas/algos.pyx:38 (assigningnp.NINF
to anp.float16
container in "cython-eventually-converted-to-C" codeAs 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.Since
MINfloat6
it is not being used in all pandas code, I recommend eliminating this line and/or commentating the reason. I tried by usingnp.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.Why 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.
No 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.
The text was updated successfully, but these errors were encountered: