code: def cwt(data, wavelet, widths, dtype=None, **kwargs):
      """
      .. deprecated:: 1.12.0
  
          scipy.signal.cwt is deprecated in SciPy 1.12 and will be removed
          in SciPy 1.14. We recommend using PyWavelets instead.
  
  
      Continuous wavelet transform.
  
      Performs a continuous wavelet transform on `data`,
      using the `wavelet` function. A CWT performs a convolution
      with `data` using the `wavelet` function, which is characterized
      by a width parameter and length parameter. The `wavelet` function
      is allowed to be complex.
  
      Parameters
      ----------
      data : (N,) ndarray
          data on which to perform the transform.
      wavelet : function
          Wavelet function, which should take 2 arguments.
          The first argument is the number of points that the returned vector
          will have (len(wavelet(length,width)) == length).
          The second is a width parameter, defining the size of the wavelet
          (e.g. standard deviation of a gaussian). See `ricker`, which
          satisfies these requirements.
      widths : (M,) sequence
          Widths to use for transform.
      dtype : data-type, optional
          The desired data type of output. Defaults to ``float64`` if the
          output of `wavelet` is real and ``complex128`` if it is complex.
  
          .. versionadded:: 1.4.0
  
      kwargs
          Keyword arguments passed to wavelet function.
  
          .. versionadded:: 1.4.0
  
      Returns
      -------
      cwt: (M, N) ndarray
          Will have shape of (len(widths), len(data)).
  
      Notes
      -----
  
      .. versionadded:: 1.4.0
  
      For non-symmetric, complex-valued wavelets, the input signal is convolved
      with the time-reversed complex-conjugate of the wavelet data [1].
  
      ::
  
          length = min(10 * width[ii], len(data))
          cwt[ii,:] = signal.convolve(data, np.conj(wavelet(length, width[ii],
                                          **kwargs))[::-1], mode='same')
  
      References
      ----------
      .. [1] S. Mallat, "A Wavelet Tour of Signal Processing (3rd Edition)",
          Academic Press, 2009.
  
      Examples
      --------
      >>> import numpy as np
      >>> from scipy import signal
      >>> import matplotlib.pyplot as plt
      >>> t = np.linspace(-1, 1, 200, endpoint=False)
      >>> sig  = np.cos(2 * np.pi * 7 * t) + signal.gausspulse(t - 0.4, fc=2)
      >>> widths = np.arange(1, 31)
      >>> cwtmatr = signal.cwt(sig, signal.ricker, widths)
  
      .. note:: For cwt matrix plotting it is advisable to flip the y-axis
  
      >>> cwtmatr_yflip = np.flipud(cwtmatr)
      >>> plt.imshow(cwtmatr_yflip, extent=[-1, 1, 1, 31], cmap='PRGn', aspect='auto',
      ...            vmax=abs(cwtmatr).max(), vmin=-abs(cwtmatr).max())
      >>> plt.show()
      """
      warnings.warn(_msg % "cwt", DeprecationWarning, stacklevel=2)
      return _cwt(data, wavelet, widths, dtype, **kwargs)
  
file_path: scipy/scipy/signal/_wavelets.py
imports: import warnings
  import numpy
  from scipy.linalg import eig
  from scipy.special import comb
  from scipy.signal import convolve
label_desc: Use image node_id 8 for calling a global function with example usage: cwt(data, wavelet, widths, dtype) and returns: _cwt