parameters: (self)
return_statement: return result.view('timedelta64[ns]')
docstring: Subtract pd.NaT from self
docstring_summary: Subtract pd.NaT from self
docstring_tokens: Subtract pd . NaT from self
function: def _sub_nat(self):
          """
          Subtract pd.NaT from self
          """
          # GH#19124 Timedelta - datetime is not in general well-defined.
          # We make an exception for pd.NaT, which in this case quacks
          # like a timedelta.
          # For datetime64 dtypes by convention we treat NaT as a datetime, so
          # this subtraction returns a timedelta64 dtype.
          # For period dtype, timedelta64 is a close-enough return dtype.
          result = np.zeros(len(self), dtype=np.int64)
          result.fill(iNaT)
          return result.view('timedelta64[ns]')
function_tokens: def _sub_nat ( self ) : # GH#19124 Timedelta - datetime is not in general well-defined. # We make an exception for pd.NaT, which in this case quacks # like a timedelta. # For datetime64 dtypes by convention we treat NaT as a datetime, so # this subtraction returns a timedelta64 dtype. # For period dtype, timedelta64 is a close-enough return dtype. result = np . zeros ( len ( self ) , dtype = np . int64 ) result . fill ( iNaT ) return result . view ( 'timedelta64[ns]' )