def from_vector(cls, vector): """ Create a point object from a 3d vector in Cartesian space. :param vector: Tuple, list or numpy array of three float numbers representing point coordinates in Cartesian 3d space. :returns: A :class:`Point` object created from those coordinates. """ return cls(*geo_utils.cartesian_to_spherical(vector))
def v2p(*vectors): # "vectors to points" return [Point(*coords) for coords in zip(*geo_utils.cartesian_to_spherical( numpy.array(vectors, dtype=float) ))]