Closed
Description
=================================== FAILURES ===================================
_________________________ test_dataframe_div_silenced __________________________
[gw0] linux -- Python 3.9.0 /home/travis/virtualenv/python3.9-dev/bin/python
def test_dataframe_div_silenced():
# GH#26793
pdf1 = pd.DataFrame(
{
"A": np.arange(10),
"B": [np.nan, 1, 2, 3, 4] * 2,
"C": [np.nan] * 10,
"D": np.arange(10),
},
index=list("abcdefghij"),
columns=list("ABCD"),
)
pdf2 = pd.DataFrame(
np.random.randn(10, 4), index=list("abcdefghjk"), columns=list("ABCX")
)
with tm.assert_produces_warning(None):
> pdf1.div(pdf2, fill_value=0)
pandas/tests/arithmetic/test_numeric.py:1311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <contextlib._GeneratorContextManager object at 0x7f00d965da90>
type = None, value = None, traceback = None
def __exit__(self, type, value, traceback):
if type is None:
try:
> next(self.gen)
E AssertionError: Caused unexpected warning(s): [('DeprecationWarning', DeprecationWarning('`np.bool` is a deprecated alias for the builtin `bool`. Use `bool` by itself, which is identical in behavior, to silence this warning. If you specifically wanted the numpy scalar type, use `np.bool_` here.'), '/home/travis/build/pandas-dev/pandas/pandas/core/indexes/base.py', 377), ('DeprecationWarning', DeprecationWarning('`np.bool` is a deprecated alias for the builtin `bool`. Use `bool` by itself, which is identical in behavior, to silence this warning. If you specifically wanted the numpy scalar type, use `np.bool_` here.'), '/home/travis/build/pandas-dev/pandas/pandas/core/indexes/base.py', 377), ('DeprecationWarning', DeprecationWarning('`np.bool` is a deprecated alias for the builtin `bool`. Use `bool` by itself, which is identical in behavior, to silence this warning. If you specifically wanted the numpy scalar type, use `np.bool_` here.'), '/home/travis/build/pandas-dev/pandas/pandas/core/indexes/base.py', 377), ('DeprecationWarning', DeprecationWarning('`np.bool` is a deprecated alias for the builtin `bool`. Use `bool` by itself, which is identical in behavior, to silence this warning. If you specifically wanted the numpy scalar type, use `np.bool_` here.'), '/home/travis/build/pandas-dev/pandas/pandas/core/indexes/base.py', 377)]
https://travis-ci.org/github/pandas-dev/pandas/jobs/699262221