code: def barycentric(points):
      '''Inverse of :func:`cartesian`.'''
      points = np.asanyarray(points)
      ndim = points.ndim
      if ndim == 1:
          points = points.reshape((1,points.size))
      c = (2/np.sqrt(3.0))*points[:,1]
      b = (2*points[:,0] - c)/2.0
      a = 1.0 - c - b
      out = np.vstack([a,b,c]).T
      if ndim == 1:
          return out.reshape((3,))
      return ouf barycentric(points):
      '''Inverse of :func:`cartesian`.'''
      points = np.asanyarray(points)
      ndim = points.ndim
      if ndim == 1:
          points = points.reshape((1,points.size))
      c = (2/np.sqrt(3.0))*points[:,1]
      b = (2*points[:,0] - c)/2.0
      a = 1.0 - c - b
      out = np.vstack([a,b,c]).T
      if ndim == 1:
          return out.reshape((3,))
      return out
docs: Inverse of :func:`cartesian`.