def putmask(self, mask, new, align=True, inplace=False, axis=<NUM_LIT:0>,<EOL>transpose=False):
new_values = self.values if inplace else self.values.copy()<EOL>new = getattr(new, '<STR_LIT>', new)<EOL>mask = getattr(mask, '<STR_LIT>', mask)<EOL>if not is_list_like(new) and isna(new) and not self.is_object:<EOL><INDENT>new = self.fill_value<EOL><DEDENT>if self._can_hold_element(new):<EOL><INDENT>_, new = self._try_coerce_args(new_values, new)<EOL>if transpose:<EOL><INDENT>new_values = new_values.T<EOL><DEDENT>if getattr(new, '<STR_LIT>', <NUM_LIT:0>) >= <NUM_LIT:1>:<EOL><INDENT>if self.ndim - <NUM_LIT:1> == new.ndim and axis == <NUM_LIT:1>:<EOL><INDENT>new = np.repeat(<EOL>new, new_values.shape[-<NUM_LIT:1>]).reshape(self.shape)<EOL><DEDENT>new = new.astype(new_values.dtype)<EOL><DEDENT>if ((is_list_like(new) and<EOL>np.any(mask[mask]) and<EOL>getattr(new, '<STR_LIT>', <NUM_LIT:1>) == <NUM_LIT:1>)):<EOL><INDENT>if not (mask.shape[-<NUM_LIT:1>] == len(new) or<EOL>mask[mask].shape[-<NUM_LIT:1>] == len(new) or<EOL>len(new) == <NUM_LIT:1>):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT><DEDENT>np.putmask(new_values, mask, new)<EOL><DEDENT>elif mask.any():<EOL><INDENT>if transpose:<EOL><INDENT>mask = mask.T<EOL>if isinstance(new, np.ndarray):<EOL><INDENT>new = new.T<EOL><DEDENT>axis = new_values.ndim - axis - <NUM_LIT:1><EOL><DEDENT>if getattr(new, '<STR_LIT>', <NUM_LIT:0>) >= <NUM_LIT:1>:<EOL><INDENT>if self.ndim - <NUM_LIT:1> == new.ndim:<EOL><INDENT>new_shape = list(new.shape)<EOL>new_shape.insert(axis, <NUM_LIT:1>)<EOL>new = new.reshape(tuple(new_shape))<EOL><DEDENT><DEDENT>def f(m, v, i):<EOL><INDENT>if i is None:<EOL><INDENT>n = new<EOL><DEDENT>else:<EOL><INDENT>if isinstance(new, np.ndarray):<EOL><INDENT>n = np.squeeze(new[i % new.shape[<NUM_LIT:0>]])<EOL><DEDENT>else:<EOL><INDENT>n = np.array(new)<EOL><DEDENT>dtype, _ = maybe_promote(n.dtype)<EOL>n = n.astype(dtype)<EOL><DEDENT>nv = _putmask_smart(v, m, n)<EOL>return nv<EOL><DEDENT>new_blocks = self.split_and_operate(mask, f, inplace)<EOL>return new_blocks<EOL><DEDENT>if inplace:<EOL><INDENT>return [self]<EOL><DEDENT>if transpose:<EOL><INDENT>new_values = new_values.T<EOL><DEDENT>return [self.make_block(new_values)]<EOL>
putmask the data to the block; it is possible that we may create a
        new dtype of block

        return the resulting block(s)

        Parameters
        ----------
        mask  : the condition to respect
        new : a ndarray/object
        align : boolean, perform alignment on other/cond, default is True
        inplace : perform inplace modification, default is False
        axis : int
        transpose : boolean
            Set to True if self is stored with axes reversed

        Returns
        -------
        a list of new blocks, the result of the putmask