parameters: (yaw)
docstring: Gets a rotation matrix given yaw only for 2d.
  
    Args:
      yaw: x-rotation in radians. This tensor can be any shape except an empty
        one.
  
    Returns:
      A rotation tensor with the same data type of the input. Its shape is
        [input_shape, 2, 2].
docstring_summary: Gets a rotation matrix given yaw only for 2d.
docstring_tokens: Gets a rotation matrix given yaw only for 2d .
function: def get_yaw_rotation_2d(yaw):
    """Gets a rotation matrix given yaw only for 2d.
  
    Args:
      yaw: x-rotation in radians. This tensor can be any shape except an empty
        one.
  
    Returns:
      A rotation tensor with the same data type of the input. Its shape is
        [input_shape, 2, 2].
    """
    with tf.name_scope('GetYawRotation2D'):
      cos_yaw = tf.cos(yaw)
      sin_yaw = tf.sin(yaw)
  
      return tf.stack([
          tf.stack([cos_yaw, -1.0 * sin_yaw], axis=-1),
          tf.stack([sin_yaw, cos_yaw], axis=-1),
      ],
                      axis=-2)
function_tokens: def get_yaw_rotation_2d ( yaw ) : with tf . name_scope ( 'GetYawRotation2D' ) : cos_yaw = tf . cos ( yaw ) sin_yaw = tf . sin ( yaw ) return tf . stack ( [ tf . stack ( [ cos_yaw , - 1.0 * sin_yaw ] , axis = - 1 ) , tf . stack ( [ sin_yaw , cos_yaw ] , axis = - 1 ) , ] , axis = - 2 )