code: def rayleigh(scale=0.0, size=None, ctx=None, out=None):
      r"""Draw samples from a Rayleigh distribution.
      The :math:`\chi` and Weibull distributions are generalizations of the
      Rayleigh.
      Parameters
      ----------
      scale : float or _Symbol
          Scale, also equals the mode. Must be non-negative. Default is 1.
      size : int or tuple of ints, optional
          Output shape.  If the given shape is, e.g., ``(m, n, k)``, then
          ``m * n * k`` samples are drawn.  If size is ``None`` (default),
          a single value is returned if ``scale`` is a scalar.  Otherwise,
          ``np.array(scale).size`` samples are drawn.
      ctx : Context, optional
          Device context of output. Default is current context.
      Returns
      -------
      out : _Symbol
          Drawn samples from the parameterized Rayleigh distribution.
      """
      from ..numpy import _Symbol as np_symbol
  
      tensor_type_name = np_symbol
      if ctx is None:
          ctx = current_context()
      if size == ():
          size = None
      is_tensor = isinstance(scale, tensor_type_name)
      if is_tensor:
          return _npi.rayleigh(
              scale, scale=None, size=size, ctx=ctx, out=out
          )
      else:
          return _npi.rayleigh(scale=scale, size=size, ctx=ctx, out=out)
  
imports: import numpy
  from ...context import current_context
  from ...util import is_np_default_dtype
  from .None import _internal
label_desc: Use image node_id 11 for calling a global function with example usage: rayleigh(scale, size, ctx, out) and returns: _npi, _npi