Closed taless474 closed 4 years ago
Related to types, statistics primitives produce different dtypes for different result dimensions. E.g. in all
operation tests, we can have:
test_operation(R"(all([[1, 0, -1],[1, 2, 0]]))", R"(astype(0 ,"bool"))");
test_operation(R"(all([[1, 0, -1],[1, 2, 0]], 0))", R"(astype([1, 0, 0] ,"bool"))");
the first test passes while the second one fails:
c:\repos\phylanx\tests\unit\plugins\statistics\all_operation.cpp(569): test 'compile_and_run(code) == compile_and_run(expected_str)' failed in function 'void __cdecl test_operation(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)': '[1, 0, 0]' != '[true, false, false]'
0 sanity checks and 1 test failed.
Although
astype([1, 0, 1], "bool")
works properly, the following code (in physl) fails in an assertion: