docstr: Verify that exceptions and warnings are raised.
docstr_tok: ["Verify","that","exceptions","and","warnings","are","raised","."]
code: def test_exceptions(self):
      """
      Verify that exceptions and warnings are raised.
      """
      for xp, scp in [(cupy, cupyx.scipy), (np, scipy)]:
          # x with dimension > 1
          with pytest.raises(ValueError, match="1-D array"):
              scp.signal.peak_prominences([[0, 1, 1, 0]], [1, 2])
          # peaks with dimension > 1
          with pytest.raises(ValueError, match="1-D array"):
              scp.signal.peak_prominences([0, 1, 1, 0], [[1, 2]])
          # x with dimension < 1
          with pytest.raises(ValueError, match="1-D array"):
              scp.signal.peak_prominences(
                  3,
                  [
                      0,
                  ],
              )
  
          # empty x with supplied
          with pytest.raises(ValueError, match="not a valid index"):
              scp.signal.peak_prominences([], [0])
          # invalid indices with non-empty x
          for p in [-100, -1, 3, 1000]:
              with pytest.raises(ValueError, match="not a valid index"):
                  scp.signal.peak_prominences([1, 0, 2], [p])
  
          # wlen < 3
          with pytest.raises(ValueError, match="wlen"):
              scp.signal.peak_prominences(xp.arange(10), [3, 5], wlen=1)
  
imports: import pytest
  import cupy
  from cupy.cuda import driver
  from cupy.cuda import runtime
  from cupy import testing
  import cupyx.scipy.signal
  import numpy
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