def _maybe_mask_results(self, result, fill_value=iNaT, convert=None):
if self._hasnans:<EOL><INDENT>if convert:<EOL><INDENT>result = result.astype(convert)<EOL><DEDENT>if fill_value is None:<EOL><INDENT>fill_value = np.nan<EOL><DEDENT>result[self._isnan] = fill_value<EOL><DEDENT>return result<EOL>
Parameters
----------
result : a ndarray
fill_value : object, default iNaT
convert : string/dtype or None

Returns
-------
result : ndarray with values replace by the fill_value

mask the result if needed, convert to the provided dtype if its not
None

This is an internal routine.