docstr: Test if height of prominences is correctly calculated in signal with
  rising baseline (peak widths are 1 sample).
docstr_tok: ["Test","if","height","of","prominences","is","correctly","calculated","in","signal","with","rising","baseline","(","peak","widths","are","1","sample",")","."]
code: def test_basic(self):
      """
      Test if height of prominences is correctly calculated in signal with
      rising baseline (peak widths are 1 sample).
      """
      # Prepare basic signal
      x = np.array([-1, 1.2, 1.2, 1, 3.2, 1.3, 2.88, 2.1])
      peaks = np.array([1, 2, 4, 6])
      lbases = np.array([0, 0, 0, 5])
      rbases = np.array([3, 3, 5, 7])
      proms = x[peaks] - np.max([x[lbases], x[rbases]], axis=0)
      # Test if calculation matches handcrafted result
      out = peak_prominences(x, peaks)
      assert_equal(out[0], proms)
      assert_equal(out[1], lbases)
      assert_equal(out[2], rbases)
  
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 2 for calling the TestPeakProminences obj's underlying member method code with example usage: obj.test_basic() without return types