Skip to content

Commit 78514cf

Browse files
committed
categorical
1 parent 619d2ce commit 78514cf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/tests/arrays/categorical/test_constructors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,6 @@ def test_constructor_imaginary(self):
605605
@pytest.mark.skipif(_np_version_under1p16, reason="Skipping for NumPy <1.16")
606606
def test_constructor_string_and_tuples(self):
607607
# GH 21416
608-
c = pd.Categorical(["c", ("a", "b"), ("b", "a"), "c"])
608+
c = pd.Categorical(np.array(["c", ("a", "b"), ("b", "a"), "c"], dtype=object))
609609
expected_index = pd.Index([("a", "b"), ("b", "a"), "c"])
610610
assert c.categories.equals(expected_index)

pandas/tests/arrays/categorical/test_missing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_fillna_iterable_category(self, named):
7777
Point = collections.namedtuple("Point", "x y")
7878
else:
7979
Point = lambda *args: args # tuple
80-
cat = Categorical([Point(0, 0), Point(0, 1), None])
80+
cat = Categorical(np.array([Point(0, 0), Point(0, 1), None], dtype=object))
8181
result = cat.fillna(Point(0, 0))
8282
expected = Categorical([Point(0, 0), Point(0, 1), Point(0, 0)])
8383

0 commit comments

Comments
 (0)