def from_homogeneous(vectors, at_infinity):
    """Converts vectors from homogeneous (from point or direction)."""
    if at_infinity:
        return vectors[:-1,...]
    else:
        divided = vectors / vectors[-1,...]
        return divided[:-1,...]