docstr: Test input validation and raised exceptions.
docstr_tok: ["Test","input","validation","and","raised","exceptions","."]
code: def test_exceptions(self):
      """Test input validation and raised exceptions."""
      with raises(ValueError, match="wrong number of dimensions"):
          _local_maxima_1d(np.ones((1, 1)))
      with raises(ValueError, match="expected 'float64_t'"):
          _local_maxima_1d(np.ones(1, dtype=int))
      with raises(TypeError, match="list"):
          _local_maxima_1d([1.0, 2.0])
      with raises(TypeError, match="'x' must not be None"):
          _local_maxima_1d(None)
  
imports: from __future__ import division, print_function, absolute_import
  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._lib.six import xrange
  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 TestLocalMaxima1d obj's underlying member method code with example usage: obj.test_exceptions() without return types