Uh oh!
There was an error while loading. Please reload this page.
ARROW-13937: [C++][Compute] Add explicit output values to sign function and fix unary type checks - #11113
Conversation
edponce
commented
Sep 9, 2021
After revisiting the Also, shouldn't the floating-point kernels also return the same int type for |
1fb5c27 to
459e926Compareedponce
commented
Sep 13, 2021
@lidavidm Please help with reviews when you get a chance. |
lidavidm
commented
Sep 13, 2021
np.sign returns the same type as the input. |
lidavidm
left a comment
There was a problem hiding this comment.
Thanks. Having test coverage info would help us realize that overloads/branches aren't being taken, I think.
edponce
commented
Sep 13, 2021
cc @lidavidm The floating-point kernels need to return a floating-point type because of I was thinking last week of tests for code coverage. I actually know of several snippets of dead code. |
…on and fix unary type checks This PR adds explicit output values to the sign function for the unsigned integer kernel. This makes the kernel more readable and consistent with the other sign kernels. Also, enable_if checks are fixed for scalar unary arithmetic functions (sign, negate, absolute, ceil/floor/trunc). Closesapache#11113 from edponce/ARROW-13937-Compute-Add-explicit-output-values-to-si Authored-by: Eduardo Ponce <edponce00@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>
This PR adds explicit output values to the sign function for the unsigned integer kernel. This makes the kernel more readable and consistent with the other sign kernels.
Also, enable_if checks are fixed for scalar unary arithmetic functions (sign, negate, absolute, ceil/floor/trunc).