Skip to content

Commit b94b25c

Browse files
committed
infer_dtypes
1 parent 054e89e commit b94b25c

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

pandas/tests/dtypes/test_cast.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ def testinfer_dtype_from_scalar(self):
170170
(1, np.int_, False),
171171
(1.5, np.float_, False),
172172
([1], np.int_, False),
173-
(np.array([1]), np.int_, False),
173+
(np.array([1], dtype=np.int64), np.int64, False),
174174
([np.nan, 1, ''], np.object_, False),
175175
(np.array([[1.0, 2.0]]), np.float_, False),
176176
(pd.Categorical(list('aabc')), np.object_, False),
177-
(pd.Categorical([1, 2, 3]), np.int_, False),
177+
(pd.Categorical([1, 2, 3]), np.int64, False),
178178
(pd.Categorical(list('aabc')), 'category', True),
179179
(pd.Categorical([1, 2, 3]), 'category', True),
180180
(Timestamp('20160101'), np.object_, False),

pandas/tests/frame/test_indexing.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -2724,17 +2724,18 @@ def test_where_axis(self):
27242724
assert_frame_equal(result, expected)
27252725

27262726
# Multiple dtypes (=> multiple Blocks)
2727-
df = pd.concat([DataFrame(np.random.randn(10, 2)),
2728-
DataFrame(np.random.randint(0, 10, size=(10, 2)))],
2729-
ignore_index=True, axis=1)
2727+
df = pd.concat([
2728+
DataFrame(np.random.randn(10, 2)),
2729+
DataFrame(np.random.randint(0, 10, size=(10, 2)), dtype='int64')],
2730+
ignore_index=True, axis=1)
27302731
mask = DataFrame(False, columns=df.columns, index=df.index)
27312732
s1 = Series(1, index=df.columns)
27322733
s2 = Series(2, index=df.index)
27332734

27342735
result = df.where(mask, s1, axis='columns')
27352736
expected = DataFrame(1.0, columns=df.columns, index=df.index)
2736-
expected[2] = expected[2].astype(int)
2737-
expected[3] = expected[3].astype(int)
2737+
expected[2] = expected[2].astype('int64')
2738+
expected[3] = expected[3].astype('int64')
27382739
assert_frame_equal(result, expected)
27392740

27402741
result = df.copy()
@@ -2743,8 +2744,8 @@ def test_where_axis(self):
27432744

27442745
result = df.where(mask, s2, axis='index')
27452746
expected = DataFrame(2.0, columns=df.columns, index=df.index)
2746-
expected[2] = expected[2].astype(int)
2747-
expected[3] = expected[3].astype(int)
2747+
expected[2] = expected[2].astype('int64')
2748+
expected[3] = expected[3].astype('int64')
27482749
assert_frame_equal(result, expected)
27492750

27502751
result = df.copy()

pandas/tests/indexing/test_coercion.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1242,8 +1242,8 @@ def _assert_replace_conversion(self, from_key, to_key, how):
12421242
(from_key == 'complex128' and
12431243
to_key in ('int64', 'float64'))):
12441244

1245-
# buggy on 32-bit
1246-
if tm.is_platform_32bit():
1245+
# buggy on 32-bit / window
1246+
if compat.is_platform_32bit() or compat.is_platform_windows():
12471247
pytest.skip("32-bit platform buggy: {0} -> {1}".format
12481248
(from_key, to_key))
12491249

0 commit comments

Comments
 (0)