clpy
clpy copied to clipboard
Debug 0 size reduction function
In #85 , we found reduction functions have bug. Reduction functions meet problem if input was 0 size ndarray. In vega, reduction function will be hangup ( if input was 0 size ndarray). In titanv, reduction function raise error ( if input was 0 size ndarray). In furyx has no problem.
In #207 , I implemented exception code to solve this issue. And pass the test_truth test.
But, I think there will be better way to over come this issue without exception code.
@t-kitawaki Thank you for reporting. Can you provide steps to reproduce the bug?
To reproduce this issue, remove this code and run reduction function (like any all sum prod max min...
) with 0 size input.
https://github.com/fixstars/clpy/blob/1de64f1e1146df4baac365c413cedcadb974738a/clpy/core/reduction.pxi#L252-L262
Easy way to run 0 size reduction function is run clpy_tests/logic_tests/test_truth.py lile #85 .