code: def transform_position_array(array, pos, euler, is_normal, reverse=False):
      
      trans_matrix = euler_trans_matrix(*euler)
  
      if not reverse:
          trans_matrix = trans_matrix.T
  
      if isinstance(array, ComputedColumn):
          array = array.for_computations
  
      if is_normal:
          # then we don't do an offset by the position
          return np.dot(np.asarray(array), trans_matrix)
      else:
          return np.dot(np.asarray(array), trans_matrix) + np.asarray(pos)
docs: Transform any Nx3 position array by translating to a center-of-mass 'pos'
      and applying an euler transformation
  
      :parameter array array: numpy array of Nx3 positions in the original (star)
          coordinate frame
      :parameter array pos: numpy array with length 3 giving cartesian
          coordinates to offset all positions
      :parameter array euler: euler angles (etheta, elongan, eincl) in radians
      :parameter bool is_normal: whether each entry is a normal vector rather
          than position vector.  If true, the quantities won't be offset by
          'pos'
      :return: new positions array with same shape as 'array'.