docstr: Test exceptions raised by function.
docstr_tok: ["Test","exceptions","raised","by","function","."]
code: def test_raises(self):
      """
      Test exceptions raised by function.
      """
      with raises(ValueError, match="1-D array"):
          find_peaks(np.array(1))
      with raises(ValueError, match="1-D array"):
          find_peaks(np.ones((2, 2)))
      with raises(ValueError, match="distance"):
          find_peaks(np.arange(10), distance=-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.windows import gaussian
  from scipy.signal._peak_finding_utils import _local_maxima_1d, PeakPropertyWarning
label_desc: Use image node_id 9 for calling the TestFindPeaks obj's underlying member method code with example usage: obj.test_raises() without return types