code: def ldexp(x1, x2, out=None, where=None, **kwargs):
      """
      Returns x1 * 2**x2, element-wise.
  
      The mantissas `x1` and twos exponents `x2` are used to construct
      floating point numbers ``x1 * 2**x2``.
  
      Parameters
      ----------
      x1 : array_like
          Tensor of multipliers.
      x2 : array_like, int
          Tensor of twos exponents.
      out : Tensor, None, or tuple of Tensor and None, optional
          A location into which the result is stored. If provided, it must have
          a shape that the inputs broadcast to. If not provided or `None`,
          a freshly-allocated tensor is returned. A tuple (possible only as a
          keyword argument) must have length equal to the number of outputs.
      where : array_like, optional
          Values of True indicate to calculate the ufunc at that position, values
          of False indicate to leave the value in the output alone.
      **kwargs
  
      Returns
      -------
      y : Tensor or scalar
          The result of ``x1 * 2**x2``.
  
      See Also
      --------
      frexp : Return (y1, y2) from ``x = y1 * 2**y2``, inverse to `ldexp`.
  
      Notes
      -----
      Complex dtypes are not supported, they will raise a TypeError.
  
      `ldexp` is useful as the inverse of `frexp`, if used by itself it is
      more clear to simply use the expression ``x1 * 2**x2``.
  
      Examples
      --------
      >>> import mars.tensor as mt
  
      >>> mt.ldexp(5, mt.arange(4)).execute()
      array([  5.,  10.,  20.,  40.], dtype=float32)
  
      >>> x = mt.arange(6)
      >>> mt.ldexp(*mt.frexp(x)).execute()
      array([ 0.,  1.,  2.,  3.,  4.,  5.])
      """
      x2_dtype = astensor(x2).dtype
      casting = kwargs.get("casting", "safe")
      if not np.can_cast(x2_dtype, np.int64, casting=casting):
          raise TypeError(
              "ufunc 'ldexp' not supported for the input types, "
              "and the inputs could not be safely coerced to any supported types "
              f"according to the casting rule ''{casting}''"
          )
  
      op = TensorLdexp(**kwargs)
      return op(x1, x2, out=out, where=where)
  
file_path: mars/mars/tensor/arithmetic/ldexp.py
imports: import numpy
  from ...None import opcodes
  from ..utils import infer_dtype
  from ..datasource import tensor
  from .core import TensorBinOp
  from .utils import arithmetic_operand
label_desc: Use image node_id 1 for calling a global function with example usage: ldexp(x1, x2, out, where) and returns: op