rapidsai/cudf

[BUG] Tests of ufuncs should ensure values are in the right domain

Open

#12,352 创建于 2022年12月9日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)C++ (6,000 star) (735 fork)batch import
0 - BacklogPythonbuggood first issuetests

描述

Describe the bug The test_array_ufunc.py module contains tests that I introduced in #10346 and #10217 that are intended to be generic for all ufuncs in test_ufunc_(index|series|dataframe). However, the inputs are generated in exactly the same way for all ufuncs. This leads to some tests where all inputs are invalid, making some of the tests do nothing other than ensure that invalid inputs produce the same output. Some of the most egregious examples are inverse trigonometric functions arcsin and arccos, for which the domains are limited to (-1, 1) but all inputs are > 1.

Steps/Code to reproduce bug Run the tests and check warnings.

Expected behavior The tests should be rewritten to generate inputs within the domain of the functions of choice, with perhaps just a few values outside the domain so that we can continue to validate consistent behavior in both cases. In an ideal world we would also update cudf to throw the same warnings as pandas here, but that may be more work than it's worth since we would almost certainly have to introspect the data.

贡献者指南