Skip to content

Commit 2736889

Browse files
authored
BUG: Recognize 2-tuple state without attrs dict (#62832)
1 parent bf1a089 commit 2736889

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/_libs/arrays.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ cdef class NDArrayBacked:
100100
if len(state) == 1 and isinstance(state[0], dict):
101101
self.__setstate__(state[0])
102102
return
103+
elif len(state) == 2:
104+
# GH#62820: Handle missing attrs dict during auto-unpickling
105+
self.__setstate__((*state, {}))
106+
return
103107
raise NotImplementedError(state) # pragma: no cover
104108

105109
data, dtype = state[:2]

0 commit comments

Comments
 (0)