on 32bit -- Series is int64 but cut produces int32 series · Issue #14866 · pandas-dev/pandas (original) (raw)
Code Sample, a copy-pastable example if possible
failing on 32bit test
def test_single_bin(self):
# issue 14652
expected = Series([0, 0])
s = Series([9., 9.])
result = cut(s, 1, labels=False)
tm.assert_series_equal(result, expected)
s = Series([-9., -9.])
result = cut(s, 1, labels=False)
tm.assert_series_equal(result, expected)
Problem description
orig: https://buildd.debian.org/status/fetch.php?pkg=pandas&arch=i386&ver=0.19.1%2Bgit174-g81a2f79-1&stamp=1481436461 (still don't know about "bad argument to internal function" -- can't replicate locally, so ignore for this one):
======================================================================
FAIL: test_single_bin (pandas.tools.tests.test_tile.TestCut)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/«BUILDDIR»/pandas-0.19.1+git174-g81a2f79/debian/tmp/usr/lib/python2.7/dist-packages/pandas/tools/tests/test_tile.py", line 281, in test_single_bin
tm.assert_series_equal(result, expected)
File "/«BUILDDIR»/pandas-0.19.1+git174-g81a2f79/debian/tmp/usr/lib/python2.7/dist-packages/pandas/util/testing.py", line 1154, in assert_series_equal
assert_attr_equal('dtype', left, right)
File "/«BUILDDIR»/pandas-0.19.1+git174-g81a2f79/debian/tmp/usr/lib/python2.7/dist-packages/pandas/util/testing.py", line 878, in assert_attr_equal
left_attr, right_attr)
File "/«BUILDDIR»/pandas-0.19.1+git174-g81a2f79/debian/tmp/usr/lib/python2.7/dist-packages/pandas/util/testing.py", line 1018, in raise_assert_detail
raise AssertionError(msg)
AssertionError: Attributes are different
Attribute "dtype" are different
[left]: int32
[right]: int64
(Pdb) p expected
0 0
1 0
dtype: int64
(Pdb) p result
0 0
1 0
dtype: int32
(Pdb) p s
0 9.0
1 9.0
dtype: float64
so I guess if Series should use int64 regardless of underlying architecture default type, then cut should also produce int64, I guess.... or should Series have arch-default int??