We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aff3cd4 commit b9b1d25Copy full SHA for b9b1d25
pandas/tests/arrays/categorical/test_astype.py
@@ -134,9 +134,9 @@ def test_astype_category_copy_false_nocopy_codes(self):
134
# GH#62000
135
cat = Categorical([3, 2, 4, 1])
136
new = cat.astype("category", copy=False)
137
- assert new.codes.base is cat.codes.base or new.codes is cat.codes
+ assert tm.shares_memory(new.codes, cat.codes)
138
new = cat.astype("category", copy=True)
139
- assert not (new.codes.base is cat.codes.base or new.codes is cat.codes)
+ assert not tm.shares_memory(new.codes, cat.codes)
140
141
def test_astype_object_datetime_categories(self):
142
# GH#40754
0 commit comments