code: def where(condition, x, y):
      """Choose elements depending on condition.
  
      This function choose values depending on a given ``condition``.
      All ``condition``, ``x``, and ``y`` must have the same shape.
  
      Args:
          condition (:class:`~chainer.Variable` or :ref:`ndarray`):
              Input variable containing the condition.
              A :math:`(s_1, s_2, ..., s_N)` -shaped boolean array.
              Only boolean array is permitted.
          x (:class:`~chainer.Variable` or :ref:`ndarray`):
              Input variable chosen when ``condition`` is ``True``.
              A :math:`(s_1, s_2, ..., s_N)` -shaped float array.
          y (:class:`~chainer.Variable` or :ref:`ndarray`):
              Input variable chosen when ``condition`` is ``False``.
              A :math:`(s_1, s_2, ..., s_N)` -shaped float array.
  
      Returns:
          ~chainer.Variable: Variable containing chosen values.
  
      .. admonition:: Example
  
          >>> cond = np.array([[1, 0], [0, 1]], dtype=np.bool)
          >>> cond
          array([[ True, False],
                 [False,  True]])
          >>> x = np.array([[1, 2], [3, 4]], np.float32)
          >>> y = np.zeros((2, 2), np.float32)
          >>> F.where(cond, x, y).array
          array([[1., 0.],
                 [0., 4.]], dtype=float32)
  
      """
      if isinstance(condition, chainer.Variable):
          condition = condition.array
  
      (z,) = Where(condition).apply((x, y))
      return z
  
file_path: chainer/chainer/functions/array/where.py
imports: import numpy
  import chainer
  from chainer import backend
  from chainer import function_node
  from chainer.utils import type_check
label_desc: Use image node_id 1 for calling a global function with example usage: where(condition, x, y) and returns: z