def __setstate__(self, state):
if isinstance(state, tuple):<EOL><INDENT>nd_state, (fill_value, sp_index) = state<EOL>sparse_values = np.array([])<EOL>sparse_values.__setstate__(nd_state)<EOL>self._sparse_values = sparse_values<EOL>self._sparse_index = sp_index<EOL>self._dtype = SparseDtype(sparse_values.dtype, fill_value)<EOL><DEDENT>else:<EOL><INDENT>self.__dict__.update(state)<EOL><DEDENT>
Necessary for making this object picklable