code: def test_cwt(self):
      widths = [1.0]
      delta_wavelet = lambda s, t: np.array([1])
      len_data = 100
      test_data = np.sin(np.pi * np.arange(0, len_data) / 10.0)
  
      # Test delta function input gives same data as output
      cwt_dat = wavelets.cwt(test_data, delta_wavelet, widths)
      assert_(cwt_dat.shape == (len(widths), len_data))
      assert_array_almost_equal(test_data, cwt_dat.flatten())
  
      # Check proper shape on output
      widths = [1, 3, 4, 5, 10]
      cwt_dat = wavelets.cwt(test_data, wavelets.ricker, widths)
      assert_(cwt_dat.shape == (len(widths), len_data))
  
      widths = [len_data * 10]
      # Note: this wavelet isn't defined quite right, but is fine for this test
      flat_wavelet = lambda l, w: np.ones(w) / w
      cwt_dat = wavelets.cwt(test_data, flat_wavelet, widths)
      assert_array_almost_equal(cwt_dat, np.mean(test_data))
  
file_path: catboost/contrib/python/scipy/py2/scipy/signal/tests/test_wavelets.py
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_equal, assert_array_equal, assert_array_almost_equal, assert_array_less, assert_
  from scipy._lib.six import xrange
  from scipy.signal import wavelets
label_desc: Use image node_id 6 for calling the TestWavelets obj's underlying member method code with example usage: obj.test_cwt() without return types