parameters: (angle, axis)
return_statement: return q
docstring: Return quaternion for rotation about axis.
  
      >>> q = quaternion_about_axis(0.123, [1, 0, 0])
      >>> numpy.allclose(q, [0.99810947, 0.06146124, 0, 0])
      True
docstring_summary: Return quaternion for rotation about axis.
docstring_tokens: Return quaternion for rotation about axis .
function: def quaternion_about_axis(angle, axis):
    """Return quaternion for rotation about axis.
  
      >>> q = quaternion_about_axis(0.123, [1, 0, 0])
      >>> numpy.allclose(q, [0.99810947, 0.06146124, 0, 0])
      True
  
      """
    q = numpy.array([0.0, axis[0], axis[1], axis[2]])
    qlen = vector_norm(q)
    if qlen > _EPS:
      q *= math.sin(angle / 2.0) / qlen
    q[0] = math.cos(angle / 2.0)
    return q
function_tokens: def quaternion_about_axis ( angle , axis ) : q = numpy . array ( [ 0.0 , axis [ 0 ] , axis [ 1 ] , axis [ 2 ] ] ) qlen = vector_norm ( q ) if qlen > _EPS : q *= math . sin ( angle / 2.0 ) / qlen q [ 0 ] = math . cos ( angle / 2.0 ) return q