code: def modf(x, out1=None, out2=None, out=None, where=None, **kwargs):
      """
      Return the fractional and integral parts of a tensor, element-wise.
  
      The fractional and integral parts are negative if the given number is
      negative.
  
      Parameters
      ----------
      x : array_like
          Input tensor.
      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
      -------
      y1 : Tensor
          Fractional part of `x`.
      y2 : Tensor
          Integral part of `x`.
  
      Notes
      -----
      For integer input the return values are floats.
  
      See Also
      --------
      divmod : ``divmod(x, 1)`` is equivalent to ``modf`` with the return values
               switched, except it always has a positive remainder.
  
      Examples
      --------
      >>> import mars.tensor as mt
  
      >>> mt.modf([0, 3.5]).execute()
      (array([ 0. ,  0.5]), array([ 0.,  3.]))
      >>> mt.modf(-0.5).execute()
      (-0.5, -0)
      """
      x = astensor(x)
      op = TensorModf(**kwargs)
      return op(x, out1=out1, out2=out2, out=out, where=where)
  
file_path: mars/mars/tensor/arithmetic/modf.py
imports: import numpy
  from ...None import opcodes
  from ..array_utils import as_same_device, device
  from ..datasource import tensor
  from .core import TensorOutBinOp
label_desc: Use image node_id 1 for calling a global function with example usage: modf(x, out1, out2, out, where) and returns: op