code: def as_float_array(a):
      
      return np.asarray(a, dtype=np.quaternion).view((np.double, 4))
docs: View the quaternion array as an array of floats
  
      This function is fast (of order 1 microsecond) because no data is
      copied; the returned quantity is just a "view" of the original.
  
      The output view has one more dimension (of size 4) than the input
      array, but is otherwise the same shape.