code: def vec2ang(vectors, lonlat=False):
      
      x, y, z = vectors.transpose()
      rep_car = CartesianRepresentation(x, y, z)
      rep_sph = rep_car.represent_as(UnitSphericalRepresentation)
      return _lonlat_to_healpy(rep_sph.lon.ravel(), rep_sph.lat.ravel(), lonlat=lonlat)
docs: Drop-in replacement for healpy `~healpy.pixelfunc.vec2ang`.