Closed
Description
https://travis-ci.org/pandas-dev/pandas/jobs/200390418
these are test failures from an API change: numpy/numpy#8231
cc @shoyer
I think we don't have numexpr
installed on the dev build so these tests are skipped :<
=================================== FAILURES ===================================
_______________________ TestExpressions.test_binary_ops ________________________
self = <pandas.tests.test_expressions.TestExpressions testMethod=test_binary_ops>
def test_binary_ops(self):
def testit():
for f, f2 in [(self.frame, self.frame2),
(self.mixed, self.mixed2)]:
for op, op_str in [('add', '+'), ('sub', '-'), ('mul', '*'),
('div', '/'), ('pow', '**')]:
if op == 'div':
op = getattr(operator, 'truediv', None)
else:
op = getattr(operator, op, None)
if op is not None:
result = expr._can_use_numexpr(op, op_str, f, f,
'evaluate')
self.assertNotEqual(result, f._is_mixed_type)
result = expr.evaluate(op, op_str, f, f,
use_numexpr=True)
expected = expr.evaluate(op, op_str, f, f,
use_numexpr=False)
if isinstance(result, DataFrame):
tm.assert_frame_equal(result, expected)
else:
tm.assert_numpy_array_equal(result,
expected.values)
result = expr._can_use_numexpr(op, op_str, f2, f2,
'evaluate')
self.assertFalse(result)
expr.set_use_numexpr(False)
> testit()
pandas/tests/test_expressions.py:301:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/test_expressions.py:286: in testit
use_numexpr=True)
pandas/computation/expressions.py:210: in evaluate
**eval_kwargs)
pandas/computation/expressions.py:63: in _evaluate_standard
return op(a, b)
pandas/core/ops.py:1230: in f
return self._combine_frame(other, na_op, fill_value, level)
pandas/core/frame.py:3527: in _combine_frame
result = dict([(col, f(col)) for col in this])
pandas/core/frame.py:3527: in <listcomp>
result = dict([(col, f(col)) for col in this])
pandas/core/frame.py:3523: in f
r = _arith_op(this[col].values, other[col].values)
pandas/core/frame.py:3515: in _arith_op
return func(left, right)
pandas/core/ops.py:1172: in na_op
raise_on_error=True, **eval_kwargs)
pandas/computation/expressions.py:210: in evaluate
**eval_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
op = <built-in function pow>, op_str = '**'
a = array([-1, 0, 0, ..., 0, 0, 0])
b = array([-1, 0, 0, ..., 0, 0, 0]), raise_on_error = True
eval_kwargs = {}
def _evaluate_standard(op, op_str, a, b, raise_on_error=True, **eval_kwargs):
""" standard evaluation """
if _TEST_MODE:
_store_test_result(False)
with np.errstate(all='ignore'):
> return op(a, b)
E ValueError: Integers to negative integer powers are not allowed.
pandas/computation/expressions.py:63: ValueError
___________________ TestExpressions.test_integer_arithmetic ____________________
self = <pandas.tests.test_expressions.TestExpressions testMethod=test_integer_arithmetic>
def test_integer_arithmetic(self):
self.run_arithmetic_test(self.integer, self.integer,
> assert_frame_equal)
pandas/tests/test_expressions.py:105:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/test_expressions.py:98: in run_arithmetic_test
assert_func(expected, result)
pandas/util/testing.py:1321: in assert_frame_equal
obj='DataFrame.iloc[:, {0}]'.format(i))
pandas/util/testing.py:1190: in assert_series_equal
obj='{0}'.format(obj))
pandas/src/testing.pyx:59: in pandas._testing.assert_almost_equal (pandas/src/testing.c:4156)
cpdef assert_almost_equal(a, b,
pandas/src/testing.pyx:173: in pandas._testing.assert_almost_equal (pandas/src/testing.c:3274)
raise_assert_detail(obj, msg, lobj, robj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = 'DataFrame.iloc[:, 0]'
message = 'DataFrame.iloc[:, 0] values are different (86.51135 %)'
left = '[16777216, 0, 0, 7437354637604294721, 4951460147845608313, 0, 0, -6776596920136667815, 8028209804145959321, -49703392...6018427387904, 0, 46656, 3792227444683241861, -497033925936021504, -4053175462519618527, 0, -6629298651489370112, ...]'
right = '[16777216, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -92233720368547758...56, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, ...]'
diff = None
def raise_assert_detail(obj, message, left, right, diff=None):
if isinstance(left, np.ndarray):
left = pprint_thing(left)
if isinstance(right, np.ndarray):
right = pprint_thing(right)
msg = """{0} are different
{1}
[left]: {2}
[right]: {3}""".format(obj, message, left, right)
if diff is not None:
msg = msg + "\n[diff]: {diff}".format(diff=diff)
> raise AssertionError(msg)
E AssertionError: DataFrame.iloc[:, 0] are different
E
E DataFrame.iloc[:, 0] values are different (86.51135 %)
E [left]: [16777216, 0, 0, 7437354637604294721, 4951460147845608313, 0, 0, -6776596920136667815, 8028209804145959321, -497033925936021504, 1483551237918615471, 0, -8795647696940200745, -4940275718618612379, 1, -4675932718989443137, -145357957422043229, 0, 2110287360296998863, 2536461848307888459, -4642015662142636065, -7394533151961528133, 0, -4689350456247753643, -3660930864499998817, 0, -4689350456247753643, -5821812116355782473, -5296008294479953920, 2823291043684304491, 4593512421086651489, 27, -1595931050845505211, -5821812116355782473, 2536461848307888459, 0, -4071272324936764365, -1902703244836818301, -5821812116355782473, 2110287360296998863, 0, -4675932718989443137, -5296008294479953920, 387420489, 2110287360296998863, 2823291043684304491, 0, 0, 0, 27, -1595931050845505211, 6353754964178307979, 4611686018427387904, -2863221430593058543, 8037740809528595931, -7924192819420782515, -145357957422043229, 0, 387420489, 0, 0, -1902703244836818301, -8795647696940200745, 0, 0, 2565992168703393792, 0, -4689350456247753643, 5529354540715494413, -2863221430593058543, 8028209804145959321, -8206467232675302283, 302875106592253, 256, -4053175462519618527, 4593512421086651489, 4121466560160202752, 823543, -5821812116355782473, -4689350456247753643, -497033925936021504, -1902703244836818301, -3660930864499998817, 6353754964178307979, -5296008294479953920, 8916100448256, 0, 4593512421086651489, 2644539488379390509, 0, 0, 3030756035345000135, 4611686018427387904, 0, 46656, 3792227444683241861, -497033925936021504, -4053175462519618527, 0, -6629298651489370112, ...]
E [right]: [16777216, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 27, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 387420489, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 27, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 387420489, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 302875106592253, 256, -9223372036854775808, -9223372036854775808, -9223372036854775808, 823543, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 8916100448256, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 46656, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, ...]
pandas/util/testing.py:1028: AssertionError
________________ TestExpressions.test_integer_arithmetic_frame _________________
self = <pandas.tests.test_expressions.TestExpressions testMethod=test_integer_arithmetic_frame>
def test_integer_arithmetic_frame(self):
> self.run_frame(self.integer, self.integer)
pandas/tests/test_expressions.py:188:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/test_expressions.py:147: in run_frame
test_flex=False, **kwargs)
pandas/tests/test_expressions.py:98: in run_arithmetic_test
assert_func(expected, result)
pandas/util/testing.py:1321: in assert_frame_equal
obj='DataFrame.iloc[:, {0}]'.format(i))
pandas/util/testing.py:1190: in assert_series_equal
obj='{0}'.format(obj))
pandas/src/testing.pyx:59: in pandas._testing.assert_almost_equal (pandas/src/testing.c:4156)
cpdef assert_almost_equal(a, b,
pandas/src/testing.pyx:173: in pandas._testing.assert_almost_equal (pandas/src/testing.c:3274)
raise_assert_detail(obj, msg, lobj, robj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = 'DataFrame.iloc[:, 0]'
message = 'DataFrame.iloc[:, 0] values are different (86.51135 %)'
left = '[16777216, 0, 0, 7437354637604294721, 4951460147845608313, 0, 0, -6776596920136667815, 8028209804145959321, -49703392...6018427387904, 0, 46656, 3792227444683241861, -497033925936021504, -4053175462519618527, 0, -6629298651489370112, ...]'
right = '[16777216, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -92233720368547758...56, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, ...]'
diff = None
def raise_assert_detail(obj, message, left, right, diff=None):
if isinstance(left, np.ndarray):
left = pprint_thing(left)
if isinstance(right, np.ndarray):
right = pprint_thing(right)
msg = """{0} are different
{1}
[left]: {2}
[right]: {3}""".format(obj, message, left, right)
if diff is not None:
msg = msg + "\n[diff]: {diff}".format(diff=diff)
> raise AssertionError(msg)
E AssertionError: DataFrame.iloc[:, 0] are different
E
E DataFrame.iloc[:, 0] values are different (86.51135 %)
E [left]: [16777216, 0, 0, 7437354637604294721, 4951460147845608313, 0, 0, -6776596920136667815, 8028209804145959321, -497033925936021504, 1483551237918615471, 0, -8795647696940200745, -4940275718618612379, 1, -4675932718989443137, -145357957422043229, 0, 2110287360296998863, 2536461848307888459, -4642015662142636065, -7394533151961528133, 0, -4689350456247753643, -3660930864499998817, 0, -4689350456247753643, -5821812116355782473, -5296008294479953920, 2823291043684304491, 4593512421086651489, 27, -1595931050845505211, -5821812116355782473, 2536461848307888459, 0, -4071272324936764365, -1902703244836818301, -5821812116355782473, 2110287360296998863, 0, -4675932718989443137, -5296008294479953920, 387420489, 2110287360296998863, 2823291043684304491, 0, 0, 0, 27, -1595931050845505211, 6353754964178307979, 4611686018427387904, -2863221430593058543, 8037740809528595931, -7924192819420782515, -145357957422043229, 0, 387420489, 0, 0, -1902703244836818301, -8795647696940200745, 0, 0, 2565992168703393792, 0, -4689350456247753643, 5529354540715494413, -2863221430593058543, 8028209804145959321, -8206467232675302283, 302875106592253, 256, -4053175462519618527, 4593512421086651489, 4121466560160202752, 823543, -5821812116355782473, -4689350456247753643, -497033925936021504, -1902703244836818301, -3660930864499998817, 6353754964178307979, -5296008294479953920, 8916100448256, 0, 4593512421086651489, 2644539488379390509, 0, 0, 3030756035345000135, 4611686018427387904, 0, 46656, 3792227444683241861, -497033925936021504, -4053175462519618527, 0, -6629298651489370112, ...]
1mE [right]: [16777216, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 27, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 387420489, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 27, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 387420489, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 302875106592253, 256, -9223372036854775808, -9223372036854775808, -9223372036854775808, 823543, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 8916100448256, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 46656, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, ...]
pandas/util/testing.py:1028: AssertionError
________________ TestExpressions.test_integer_arithmetic_series ________________
self = <pandas.tests.test_expressions.TestExpressions testMethod=test_integer_arithmetic_series>
def test_integer_arithmetic_series(self):
> self.run_series(self.integer.iloc[:, 0], self.integer.iloc[:, 0])
pandas/tests/test_expressions.py:191:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/test_expressions.py:162: in run_series
test_flex=False, **kwargs)
pandas/tests/test_expressions.py:98: in run_arithmetic_test
assert_func(expected, result)
pandas/util/testing.py:1190: in assert_series_equal
obj='{0}'.format(obj))
pandas/src/testing.pyx:59: in pandas._testing.assert_almost_equal (pandas/src/testing.c:4156)
cpdef assert_almost_equal(a, b,
pandas/src/testing.pyx:173: in pandas._testing.assert_almost_equal (pandas/src/testing.c:3274)
raise_assert_detail(obj, msg, lobj, robj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = 'Series', message = 'Series values are different (86.51135 %)'
left = '[16777216, 0, 0, 7437354637604294721, 4951460147845608313, 0, 0, -6776596920136667815, 8028209804145959321, -49703392...6018427387904, 0, 46656, 3792227444683241861, -497033925936021504, -4053175462519618527, 0, -6629298651489370112, ...]'
right = '[16777216, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -92233720368547758...56, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, ...]'
diff = None
def raise_assert_detail(obj, message, left, right, diff=None):
if isinstance(left, np.ndarray):
left = pprint_thing(left)
if isinstance(right, np.ndarray):
right = pprint_thing(right)
msg = """{0} are different
{1}
[left]: {2}
[right]: {3}""".format(obj, message, left, right)
if diff is not None:
msg = msg + "\n[diff]: {diff}".format(diff=diff)
> raise AssertionError(msg)
E AssertionError: Series are different
E
E Series values are different (86.51135 %)
E [left]: [16777216, 0, 0, 7437354637604294721, 4951460147845608313, 0, 0, -6776596920136667815, 8028209804145959321, -497033925936021504, 1483551237918615471, 0, -8795647696940200745, -4940275718618612379, 1, -4675932718989443137, -145357957422043229, 0, 2110287360296998863, 2536461848307888459, -4642015662142636065, -7394533151961528133, 0, -4689350456247753643, -3660930864499998817, 0, -4689350456247753643, -5821812116355782473, -5296008294479953920, 2823291043684304491, 4593512421086651489, 27, -1595931050845505211, -5821812116355782473, 2536461848307888459, 0, -4071272324936764365, -1902703244836818301, -5821812116355782473, 2110287360296998863, 0, -4675932718989443137, -5296008294479953920, 387420489, 2110287360296998863, 2823291043684304491, 0, 0, 0, 27, -1595931050845505211, 6353754964178307979, 4611686018427387904, -2863221430593058543, 8037740809528595931, -7924192819420782515, -145357957422043229, 0, 387420489, 0, 0, -1902703244836818301, -8795647696940200745, 0, 0, 2565992168703393792, 0, -4689350456247753643, 5529354540715494413, -2863221430593058543, 8028209804145959321, -8206467232675302283, 302875106592253, 256, -4053175462519618527, 4593512421086651489, 4121466560160202752, 823543, -5821812116355782473, -4689350456247753643, -497033925936021504, -1902703244836818301, -3660930864499998817, 6353754964178307979, -5296008294479953920, 8916100448256, 0, 4593512421086651489, 2644539488379390509, 0, 0, 3030756035345000135, 4611686018427387904, 0, 46656, 3792227444683241861, -497033925936021504, -4053175462519618527, 0, -6629298651489370112, ...]
E [right]: [16777216, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 27, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 387420489, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 27, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 387420489, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 302875106592253, 256, -9223372036854775808, -9223372036854775808, -9223372036854775808, 823543, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 8916100448256, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, 46656, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, ...]
pandas/util/testing.py:1028: AssertionError
___________________ TestExpressions.test_integer_with_zeros ____________________
self = <pandas.tests.test_expressions.TestExpressions testMethod=test_integer_with_zeros>
def test_integer_with_zeros(self):
self.integer *= np.random.randint(0, 2, size=np.shape(self.integer))
self.run_arithmetic_test(self.integer, self.integer,
> assert_frame_equal)
pandas/tests/test_expressions.py:242:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/test_expressions.py:98: in run_arithmetic_test
assert_func(expected, result)
pandas/util/testing.py:1321: in assert_frame_equal
obj='DataFrame.iloc[:, {0}]'.format(i))
pandas/util/testing.py:1190: in assert_series_equal
obj='{0}'.format(obj))
pandas/src/testing.pyx:59: in pandas._testing.assert_almost_equal (pandas/src/testing.c:4156)
cpdef assert_almost_equal(a, b,
pandas/src/testing.pyx:173: in pandas._testing.assert_almost_equal (pandas/src/testing.c:3274)
raise_assert_detail(obj, msg, lobj, robj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = 'DataFrame.iloc[:, 0]'
message = 'DataFrame.iloc[:, 0] values are different (43.36566 %)'
left = '[1, 0, 1, 7437354637604294721, 4951460147845608313, 1, 0, -6776596920136667815, 1, 1, 1, 1, -8795647696940200745, -49...390509, 0, 1, 3030756035345000135, 4611686018427387904, 1, 1, 3792227444683241861, 1, 1, 1, -6629298651489370112, ...]'
right = '[1, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, -922337203685477580...775808, 1, -9223372036854775808, -9223372036854775808, 1, 1, -9223372036854775808, 1, 1, 1, -9223372036854775808, ...]'
diff = None
def raise_assert_detail(obj, message, left, right, diff=None):
if isinstance(left, np.ndarray):
left = pprint_thing(left)
if isinstance(right, np.ndarray):
right = pprint_thing(right)
msg = """{0} are different
{1}
[left]: {2}
[right]: {3}""".format(obj, message, left, right)
if diff is not None:
msg = msg + "\n[diff]: {diff}".format(diff=diff)
> raise AssertionError(msg)
E AssertionError: DataFrame.iloc[:, 0] are different
E
E DataFrame.iloc[:, 0] values are different (43.36566 %)
E [left]: [1, 0, 1, 7437354637604294721, 4951460147845608313, 1, 0, -6776596920136667815, 1, 1, 1, 1, -8795647696940200745, -4940275718618612379, 1, 1, 1, 0, 2110287360296998863, 1, 1, -7394533151961528133, 0, 1, -3660930864499998817, 0, -4689350456247753643, 1, -5296008294479953920, 1, 4593512421086651489, 27, 1, -5821812116355782473, 1, 1, 1, 1, -5821812116355782473, 1, 1, -4675932718989443137, -5296008294479953920, 387420489, 1, 1, 0, 0, 1, 1, 1, 6353754964178307979, 1, -2863221430593058543, 8037740809528595931, 1, -145357957422043229, 1, 387420489, 1, 1, 1, 1, 0, 0, 1, 1, -4689350456247753643, 5529354540715494413, 1, 8028209804145959321, 1, 1, 1, -4053175462519618527, 4593512421086651489, 4121466560160202752, 823543, -5821812116355782473, -4689350456247753643, 1, 1, -3660930864499998817, 6353754964178307979, 1, 8916100448256, 1, 4593512421086651489, 2644539488379390509, 0, 1, 3030756035345000135, 4611686018427387904, 1, 1, 3792227444683241861, 1, 1, 1, -6629298651489370112, ...]
E [right]: [1, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, 1, 1, 1, 1, -9223372036854775808, -9223372036854775808, 1, 1, 1, -9223372036854775808, -9223372036854775808, 1, 1, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, 1, -9223372036854775808, 27, 1, -9223372036854775808, 1, 1, 1, 1, -9223372036854775808, 1, 1, -9223372036854775808, -9223372036854775808, 387420489, 1, 1, -9223372036854775808, -9223372036854775808, 1, 1, 1, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, 1, 387420489, 1, 1, 1, 1, -9223372036854775808, -9223372036854775808, 1, 1, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, 1, 1, 1, -9223372036854775808, -9223372036854775808, -9223372036854775808, 823543, -9223372036854775808, -9223372036854775808, 1, 1, -9223372036854775808, -9223372036854775808, 1, 8916100448256, 1, -9223372036854775808, -9223372036854775808, -9223372036854775808, 1, -9223372036854775808, -9223372036854775808, 1, 1, -9223372036854775808, 1, 1, 1, -9223372036854775808, ...]
pandas/util/testing.py:1028: AssertionError
____________________ TestExpressions.test_mixed_arithmetic _____________________
self = <pandas.tests.test_expressions.TestExpressions testMethod=test_mixed_arithmetic>
def test_mixed_arithmetic(self):
> self.run_arithmetic_test(self.mixed, self.mixed, assert_frame_equal)
pandas/tests/test_expressions.py:234:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/test_expressions.py:91: in run_arithmetic_test
expected = op(df, other)
pandas/tests/test_expressions.py:86: in <lambda>
op = lambda x, y: getattr(df, arith)(y)
pandas/core/ops.py:1230: in f
return self._combine_frame(other, na_op, fill_value, level)
pandas/core/frame.py:3527: in _combine_frame
result = dict([(col, f(col)) for col in this])
pandas/core/frame.py:3527: in <listcomp>
result = dict([(col, f(col)) for col in this])
pandas/core/frame.py:3523: in f
r = _arith_op(this[col].values, other[col].values)
pandas/core/frame.py:3515: in _arith_op
return func(left, right)
pandas/core/ops.py:1172: in na_op
raise_on_error=True, **eval_kwargs)
pandas/computation/expressions.py:210: in evaluate
**eval_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
op = <built-in function pow>, op_str = '**'
a = array([-1, 0, 0, ..., 0, 0, 0])
b = array([-1, 0, 0, ..., 0, 0, 0]), raise_on_error = True
eval_kwargs = {}
def _evaluate_standard(op, op_str, a, b, raise_on_error=True, **eval_kwargs):
""" standard evaluation """
if _TEST_MODE:
_store_test_result(False)
with np.errstate(all='ignore'):
> return op(a, b)
E ValueError: Integers to negative integer powers are not allowed.
pandas/computation/expressions.py:63: ValueError
_________________ TestExpressions.test_mixed_arithmetic_frame __________________
self = <pandas.tests.test_expressions.TestExpressions testMethod=test_mixed_arithmetic_frame>
def test_mixed_arithmetic_frame(self):
# TODO: FIGURE OUT HOW TO GET IT TO WORK...
# can't do arithmetic because comparison methods try to do *entire*
# frame instead of by-column
> self.run_frame(self.mixed2, self.mixed2, run_binary=False)
pandas/tests/test_expressions.py:217:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/test_expressions.py:147: in run_frame
test_flex=False, **kwargs)
pandas/tests/test_expressions.py:91: in run_arithmetic_test
expected = op(df, other)
pandas/core/ops.py:1230: in f
return self._combine_frame(other, na_op, fill_value, level)
pandas/core/frame.py:3527: in _combine_frame
result = dict([(col, f(col)) for col in this])
pandas/core/frame.py:3527: in <listcomp>
result = dict([(col, f(col)) for col in this])
pandas/core/frame.py:3523: in f
r = _arith_op(this[col].values, other[col].values)
pandas/core/frame.py:3515: in _arith_op
return func(left, right)
pandas/core/ops.py:1172: in na_op
raise_on_error=True, **eval_kwargs)
pandas/computation/expressions.py:210: in evaluate
**eval_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
op = <built-in function pow>, op_str = '**'
a = array([-1, 0, 0, 0, 0, 0, 1, -1, 1, 0, 0, 0, 2, -1, 0, 1, 0,
0, -1, -1, 0, 0, 0, 0, 0, 0, ...-1, 0, 0, 0, 0, 0, -1, -1, 0, 0, 1, 0, 0,
1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0])
b = array([-1, 0, 0, 0, 0, 0, 1, -1, 1, 0, 0, 0, 2, -1, 0, 1, 0,
0, -1, -1, 0, 0, 0, 0, 0, 0, ...-1, 0, 0, 0, 0, 0, -1, -1, 0, 0, 1, 0, 0,
1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0])
raise_on_error = True, eval_kwargs = {}
def _evaluate_standard(op, op_str, a, b, raise_on_error=True, **eval_kwargs):
""" standard evaluation """
if _TEST_MODE:
_store_test_result(False)
with np.errstate(all='ignore'):
> return op(a, b)
E ValueError: Integers to negative integer powers are not allowed.
pandas/computation/expressions.py:63: ValueError
_________________ TestExpressions.test_mixed_arithmetic_series _________________
self = <pandas.tests.test_expressions.TestExpressions testMethod=test_mixed_arithmetic_series>
def test_mixed_arithmetic_series(self):
for col in self.mixed2.columns:�[0m
> self.run_series(self.mixed2[col], self.mixed2[col], binary_comp=4)
pandas/tests/test_expressions.py:221:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/tests/test_expressions.py:162: in run_series
test_flex=False, **kwargs)
pandas/tests/test_expressions.py:91: in run_arithmetic_test
expected = op(df, other)
pandas/core/ops.py:717: in wrapper
result = wrap_results(safe_na_op(lvalues, rvalues))
pandas/core/ops.py:678: in safe_na_op
return na_op(lvalues, rvalues)
pandas/core/ops.py:654: in na_op
raise_on_error=True, **eval_kwargs)
pandas/computation/expressions.py:210: in evaluate
**eval_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
op = <built-in function pow>, op_str = '**'
a = array([-1, 0, 0, 0, 0, 0, 1, -1, 1, 0, 0, 0, 2, -1, 0, 1, 0,
0, -1, -1, 0, 0, 0, 0, 0, 0, ...-1, 0, 0, 0, 0, 0, -1, -1, 0, 0, 1, 0, 0,
1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0])
b = array([-1, 0, 0, 0, 0, 0, 1, -1, 1, 0, 0, 0, 2, -1, 0, 1, 0,
0, -1, -1, 0, 0, 0, 0, 0, 0, ...-1, 0, 0, 0, 0, 0, -1, -1, 0, 0, 1, 0, 0,
1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0])
raise_on_error = True, eval_kwargs = {}
def _evaluate_standard(op, op_str, a, b, raise_on_error=True, **eval_kwargs):
""" standard evaluation """
1m if _TEST_MODE:
_store_test_result(False)
with np.errstate(all='ignore'):
> return op(a, b)
E ValueError: Integers to negative integer powers are not allowed.
pandas/computation/expressions.py:63: ValueError
= 8 failed, 11445 passed, 541 skipped, 2273 pytest-warnings in 659.30 seconds ==