@pimms.value<EOL><INDENT>def face_angle_cosines(face_coordinates):<DEDENT>
X = face_coordinates<EOL>X = np.asarray([x * (zs / (xl + np.logical_not(zs)))<EOL>for x  in [X[<NUM_LIT:1>] - X[<NUM_LIT:0>], X[<NUM_LIT:2>] - X[<NUM_LIT:1>], X[<NUM_LIT:0>] - X[<NUM_LIT:2>]]<EOL>for xl in [np.sqrt(np.sum(x**<NUM_LIT:2>, axis=<NUM_LIT:0>))]<EOL>for zs in [np.isclose(xl, <NUM_LIT:0>)]])<EOL>dps = np.asarray([np.sum(x1*x2, axis=<NUM_LIT:0>) for (x1,x2) in zip(X, -np.roll(X, <NUM_LIT:1>, axis=<NUM_LIT:0>))])<EOL>dps.setflags(write=False)<EOL>return dps<EOL>
mesh.face_angle_cosines is the (3 x d x n) matrix of the cosines of the angles of each of
the faces of the mesh; d is the number of dimensions of the mesh embedding and n is the
number of faces in the mesh.