docstr: Test edge cases.
docstr_tok: ["Test","edge","cases","."]
code: def test_edge_cases(self):
      """
      Test edge cases.
      """
      # Peaks have same height, prominence and bases
      x = [0, 2, 1, 2, 1, 2, 0]
      peaks = [1, 3, 5]
      proms, lbases, rbases = peak_prominences(x, peaks)
      assert_equal(proms, [2, 2, 2])
      assert_equal(lbases, [0, 0, 0])
      assert_equal(rbases, [6, 6, 6])
  
      # Peaks have same height & prominence but different bases
      x = [0, 1, 0, 1, 0, 1, 0]
      peaks = np.array([1, 3, 5])
      proms, lbases, rbases = peak_prominences(x, peaks)
      assert_equal(proms, [1, 1, 1])
      assert_equal(lbases, peaks - 1)
      assert_equal(rbases, peaks + 1)
  
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 3 for calling the TestPeakProminences obj's underlying member method code with example usage: obj.test_edge_cases() without return types