code: def _fhtq(a, u, inverse=False):
      """Compute the biased fast Hankel transform.
  
      This is the basic FFTLog routine.
      """
  
      # size of transform
      n = np.shape(a)[-1]
  
      # check for singular transform or singular inverse transform
      if np.isinf(u[0]) and not inverse:
          warn(f"singular transform; consider changing the bias")
          # fix coefficient to obtain (potentially correct) transform anyway
          u = u.copy()
          u[0] = 0
      elif u[0] == 0 and inverse:
          warn(
              f"singular inverse transform; consider changing the bias"
          )
          # fix coefficient to obtain (potentially correct) inverse anyway
          u = u.copy()
          u[0] = np.inf
  
      # biased fast Hankel transform via real FFT
      A = rfft(a, axis=-1)
      if not inverse:
          # forward transform
          A *= u
      else:
          # backward transform
          A /= u.conj()
      A = irfft(A, n, axis=-1)
      A = A[..., ::-1]
  
      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 5 for calling a global function with example usage: _fhtq(a, u, inverse) and returns: A