code: def angles(triangles):
      
  
      # get a vector for each edge of the triangle
      u = triangles[:, 1] - triangles[:, 0]
      v = triangles[:, 2] - triangles[:, 0]
      w = triangles[:, 2] - triangles[:, 1]
  
      # normalize each vector in place
      u /= np.linalg.norm(u, axis=1, keepdims=True)
      v /= np.linalg.norm(v, axis=1, keepdims=True)
      w /= np.linalg.norm(w, axis=1, keepdims=True)
  
      # run the cosine and an einsum that definitely does something
      a = np.arccos(np.clip(np.einsum('ij, ij->i', u, v), -1, 1))
      b = np.arccos(np.clip(np.einsum('ij, ij->i', -u, w), -1, 1))
      c = np.pi - a - b
  
      return np.column_stack([a, b, c])
docs: Calculates the angles of input triangles.
  
      Parameters
      ------------
      triangles : (n, 3, 3) float
        Vertex positions
  
      Returns
      ------------
      angles : (n, 3) float
        Angles at vertex positions, in radians