try removing restriction on windows · pandas-dev/pandas@d472646 (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -1183,13 +1183,6 @@ def _assert_replace_conversion(self, from_key, to_key, how):
1183 1183
1184 1184 result = obj.replace(replacer)
1185 1185
1186 -# buggy on windows for bool/int64
1187 -if (from_key == 'bool' and
1188 -to_key == 'int64' and
1189 -tm.is_platform_windows()):
1190 -pytest.skip("windows platform buggy: {0} -> {1}".format
1191 - (from_key, to_key))
1192 -
1193 1186 if ((from_key == 'float64' and to_key in ('int64')) or
1194 1187 (from_key == 'complex128' and
1195 1188 to_key in ('int64', 'float64'))):
Original file line number Diff line number Diff line change
@@ -928,13 +928,14 @@ def _find_common_type(types):
928 928 if all(is_timedelta64_dtype(t) for t in types):
929 929 return np.dtype('timedelta64[ns]')
930 930
931 -# don't mix bool / int or float
932 -# this is different from numpy, which casts bool/int as int
931 +# don't mix bool / int or float or complex
932 +# this is different from numpy, which casts bool with float/int as int
933 933 has_bools = any(is_bool_dtype(t) for t in types)
934 -has_ints = any(is_integer_dtype(t) for t in types)
935 -has_floats = any(is_float_dtype(t) for t in types)
936 -has_complex = any(is_complex_dtype(t) for t in types)
937 -if has_bools and (has_ints or has_floats or has_complex):
938 -return np.object
934 +if has_bools:
935 +has_ints = any(is_integer_dtype(t) for t in types)
936 +has_floats = any(is_float_dtype(t) for t in types)
937 +has_complex = any(is_complex_dtype(t) for t in types)
938 +if has_ints or has_floats or has_complex:
939 +return np.object
939 940
940 941 return np.find_common_type(types, [])