BF: define expected Series of correct for arch (eg i386) int
authorYaroslav Halchenko <debian@onerussian.com>
Sun, 2 Apr 2017 05:06:36 +0000 (05:06 +0000)
committerAndreas Tille <tille@debian.org>
Sun, 2 Apr 2017 05:06:36 +0000 (05:06 +0000)
Gbp-Pq: Name changeset_ae6a0a51cf41223394b7ef1038c210045d486cc8.diff

pandas/tools/tests/test_tile.py

index e5b9c65b515d6a5824a39a3d7a784473cf70d601..cf0da5712a5792fb7d1dd857e32a192306d5a468 100644 (file)
@@ -273,7 +273,10 @@ class TestCut(tm.TestCase):
 
     def test_single_bin(self):
         # issue 14652
-        expected = Series([0, 0])
+        # Explicit dtype since Series produces int64 for ints, while cut
+        # (due to numpy.searchsorted) would use int32 on i386, so let's assure
+        # correct default to the architecture int
+        expected = Series([0, 0], dtype=np.dtype(int))
 
         s = Series([9., 9.])
         result = cut(s, 1, labels=False)