code: def norm_array(q):
          
          assert(len(q) == 4)
          return np.sqrt(np.dot(q, q))
docs: Calculate quaternion norm on array q
          :param quaternion: array of len 4
          :returns: norm (scalar)