code: def fht(a, dln, mu, offset=0.0, bias=0.0):
      r"""Compute the fast Hankel transform.
  
      Computes the discrete Hankel transform of a logarithmically spaced periodic
      sequence using the FFTLog algorithm [1]_, [2]_.
  
      Parameters
      ----------
      a : array_like (..., n)
          Real periodic input array, uniformly logarithmically spaced.  For
          multidimensional input, the transform is performed over the last axis.
      dln : float
          Uniform logarithmic spacing of the input array.
      mu : float
          Order of the Hankel transform, any positive or negative real number.
      offset : float, optional
          Offset of the uniform logarithmic spacing of the output array.
      bias : float, optional
          Exponent of power law bias, any positive or negative real number.
  
      Returns
      -------
      A : array_like (..., n)
          The transformed output array, which is real, periodic, uniformly
          logarithmically spaced, and of the same shape as the input array.
  
      See Also
      --------
      ifht : The inverse of `fht`.
      fhtoffset : Return an optimal offset for `fht`.
  
      Notes
      -----
      This function computes a discrete version of the Hankel transform
  
      .. math::
  
          A(k) = \int_{0}^{\infty} \! a(r) \, J_\mu(kr) \, k \, dr \;,
  
      where :math:`J_\mu` is the Bessel function of order :math:`\mu`.  The index
      :math:`\mu` may be any real number, positive or negative.
  
      The input array `a` is a periodic sequence of length :math:`n`, uniformly
      logarithmically spaced with spacing `dln`,
  
      .. math::
  
          a_j = a(r_j) \;, \quad
          r_j = r_c \exp[(j-j_c) \, \mathtt{dln}]
  
      centred about the point :math:`r_c`.  Note that the central index
      :math:`j_c = (n+1)/2` is half-integral if :math:`n` is even, so that
      :math:`r_c` falls between two input elements.  Similarly, the output
      array `A` is a periodic sequence of length :math:`n`, also uniformly
      logarithmically spaced with spacing `dln`
  
      .. math::
  
         A_j = A(k_j) \;, \quad
         k_j = k_c \exp[(j-j_c) \, \mathtt{dln}]
  
      centred about the point :math:`k_c`.
  
      The centre points :math:`r_c` and :math:`k_c` of the periodic intervals may
      be chosen arbitrarily, but it would be usual to choose the product
      :math:`k_c r_c = k_j r_{n-1-j} = k_{n-1-j} r_j` to be unity.  This can be
      changed using the `offset` parameter, which controls the logarithmic offset
      :math:`\log(k_c) = \mathtt{offset} - \log(r_c)` of the output array.
      Choosing an optimal value for `offset` may reduce ringing of the discrete
      Hankel transform.
  
      If the `bias` parameter is nonzero, this function computes a discrete
      version of the biased Hankel transform
  
      .. math::
  
          A(k) = \int_{0}^{\infty} \! a_q(r) \, (kr)^q \, J_\mu(kr) \, k \, dr
  
      where :math:`q` is the value of `bias`, and a power law bias
      :math:`a_q(r) = a(r) \, (kr)^{-q}` is applied to the input sequence.
      Biasing the transform can help approximate the continuous transform of
      :math:`a(r)` if there is a value :math:`q` such that :math:`a_q(r)` is
      close to a periodic sequence, in which case the resulting :math:`A(k)` will
      be close to the continuous transform.
  
      References
      ----------
      .. [1] Talman J. D., 1978, J. Comp. Phys., 29, 35
      .. [2] Hamilton A. J. S., 2000, MNRAS, 312, 257 (astro-ph/9905191)
  
      """
  
      # size of transform
      n = np.shape(a)[-1]
  
      # bias input array
      if bias != 0:
          # a_q(r) = a(r) (r/r_c)^{-q}
          j_c = (n - 1) / 2
          j = np.arange(n)
          a = a * np.exp(-bias * (j - j_c) * dln)
  
      # compute FHT coefficients
      u = fhtcoeff(n, dln, mu, offset=offset, bias=bias)
  
      # transform
      A = _fhtq(a, u)
  
      # bias output array
      if bias != 0:
          # A(k) = A_q(k) (k/k_c)^{-q} (k_c r_c)^{-q}
          A *= np.exp(-bias * ((j - j_c) * dln + offset))
  
      return A
  
file_path: catboost/contrib/python/scipy/py3/scipy/fft/_fftlog.py
imports: import numpy
  from warnings import warn
  from ._basic import rfft, irfft
  from ..special import loggamma, poch
label_desc: Use image node_id 1 for calling a global function with example usage: fht(a, dln, mu, offset, bias) and returns: A