parameters: (arr1d, overwrite_input=False)
docstring: Equivalent to arr1d[~arr1d.isnan()], but in a different order
  
      Presumably faster as it incurs fewer copies
  
      Parameters
      ----------
      arr1d : ndarray
          Array to remove nans from
      overwrite_input : bool
          True if `arr1d` can be modified in place
  
      Returns
      -------
      res : ndarray
          Array with nan elements removed
      overwrite_input : bool
          True if `res` can be modified in place, given the constraint on the
          input
docstring_summary: Equivalent to arr1d[~arr1d.isnan()], but in a different order
docstring_tokens: Equivalent to arr1d [ ~arr1d . isnan () ] but in a different order
function: def _remove_nan_1d(arr1d, overwrite_input=False):
      """
      Equivalent to arr1d[~arr1d.isnan()], but in a different order
  
      Presumably faster as it incurs fewer copies
  
      Parameters
      ----------
      arr1d : ndarray
          Array to remove nans from
      overwrite_input : bool
          True if `arr1d` can be modified in place
  
      Returns
      -------
      res : ndarray
          Array with nan elements removed
      overwrite_input : bool
          True if `res` can be modified in place, given the constraint on the
          input
      """
  
      c = np.isnan(arr1d)
      s = np.nonzero(c)[0]
      if s.size == arr1d.size:
          warnings.warn("All-NaN slice encountered", RuntimeWarning,
                        stacklevel=5)
          return arr1d[:0], True
      elif s.size == 0:
          return arr1d, overwrite_input
      else:
          if not overwrite_input:
              arr1d = arr1d.copy()
          # select non-nans at end of array
          enonan = arr1d[-s.size:][~c[-s.size:]]
          # fill nans in beginning of array with non-nans of end
          arr1d[s[:enonan.size]] = enonan
  
          return arr1d[:-s.size], True
function_tokens: def _remove_nan_1d ( arr1d , overwrite_input = False ) : c = np . isnan ( arr1d ) s = np . nonzero ( c ) [ 0 ] if s . size == arr1d . size : warnings . warn ( "All-NaN slice encountered" , RuntimeWarning , stacklevel = 5 ) return arr1d [ : 0 ] , True elif s . size == 0 : return arr1d , overwrite_input else : if not overwrite_input : arr1d = arr1d . copy ( ) # select non-nans at end of array enonan = arr1d [ - s . size : ] [ ~ c [ - s . size : ] ] # fill nans in beginning of array with non-nans of end arr1d [ s [ : enonan . size ] ] = enonan return arr1d [ : - s . size ] , True