parameters: (value)
return_statement: return value
docstring: Ensure argument `peaks` is a 1D C-contiguous array of dtype('intp').
  
      Used in `peak_prominences` and `peak_widths` to make `peaks` compatible
      with the signature of the wrapped Cython functions.
  
      Returns
      -------
      value : ndarray
          A one-dimensional C-contiguous array with dtype('intp').
docstring_summary: Ensure argument `peaks` is a 1D C-contiguous array of dtype('intp').
docstring_tokens: Ensure argument peaks is a 1D C - contiguous array of dtype ( intp ) .
function: def _arg_peaks_as_expected(value):
      """Ensure argument `peaks` is a 1D C-contiguous array of dtype('intp').
  
      Used in `peak_prominences` and `peak_widths` to make `peaks` compatible
      with the signature of the wrapped Cython functions.
  
      Returns
      -------
      value : ndarray
          A one-dimensional C-contiguous array with dtype('intp').
      """
      value = np.asarray(value)
      if value.size == 0:
          # Empty arrays default to np.float64 but are valid input
          value = np.array([], dtype=np.intp)
      try:
          # Safely convert to C-contiguous array of type np.intp
          value = value.astype(np.intp, order='C', casting='safe',
                               subok=False, copy=False)
      except TypeError:
          raise TypeError("cannot safely cast `peaks` to dtype('intp')")
      if value.ndim != 1:
          raise ValueError('`peaks` must be a 1D array')
      return value
function_tokens: def _arg_peaks_as_expected ( value ) : value = np . asarray ( value ) if value . size == 0 : # Empty arrays default to np.float64 but are valid input value = np . array ( [ ] , dtype = np . intp ) try : # Safely convert to C-contiguous array of type np.intp value = value . astype ( np . intp , order = 'C' , casting = 'safe' , subok = False , copy = False ) except TypeError : raise TypeError ( "cannot safely cast `peaks` to dtype('intp')" ) if value . ndim != 1 : raise ValueError ( '`peaks` must be a 1D array' ) return value