def putmask(self, mask, value):
values = self.values.copy()<EOL>try:<EOL><INDENT>np.putmask(values, mask, self._convert_for_op(value))<EOL>return self._shallow_copy(values)<EOL><DEDENT>except (ValueError, TypeError) as err:<EOL><INDENT>if is_object_dtype(self):<EOL><INDENT>raise err<EOL><DEDENT>return self.astype(object).putmask(mask, value)<EOL><DEDENT>
Return a new Index of the values set with the mask.

See Also
--------
numpy.ndarray.putmask