docstr: Verify that exceptions and warnings are raised.
code: def test_exceptions(self):
      """
      Verify that exceptions and warnings are raised.
      """
      # x with dimension > 1
      with raises(ValueError, match="1-D array"):
          peak_prominences([[0, 1, 1, 0]], [1, 2])
      # peaks with dimension > 1
      with raises(ValueError, match="1-D array"):
          peak_prominences([0, 1, 1, 0], [[1, 2]])
      # x with dimension < 1
      with raises(ValueError, match="1-D array"):
          peak_prominences(
              3,
              [
                  0,
              ],
          )
  
      # empty x with supplied
      with raises(ValueError, match="not a valid index"):
          peak_prominences([], [0])
      # invalid indices with non-empty x
      for p in [-100, -1, 3, 1000]:
          with raises(ValueError, match="not a valid index"):
              peak_prominences([1, 0, 2], [p])
  
      # peaks is not cast-able to np.intp
      with raises(TypeError, match="cannot safely cast"):
          peak_prominences([0, 1, 1, 0], [1.1, 2.3])
  
      # wlen < 3
      with raises(ValueError, match="wlen"):
          peak_prominences(np.arange(10), [3, 5], wlen=1)
  
imports: import copy
  import numpy
  from numpy.testing import assert_, assert_equal, assert_allclose, assert_array_equal
  import pytest
  from pytest import raises, warns
  from scipy.signal._peak_finding import argrelmax, argrelmin, peak_prominences, peak_widths, _unpack_condition_args, find_peaks, find_peaks_cwt, _identify_ridge_lines
  from scipy.signal._peak_finding_utils import _local_maxima_1d, PeakPropertyWarning
label_desc: Use image node_id 6 for calling the TestPeakProminences obj's underlying member method code with example usage: obj.test_exceptions() without return types