quads icon indicating copy to clipboard operation
quads copied to clipboard

Insert() is not functional when data with properties inserted

Open LeiMazizizi opened this issue 4 years ago • 0 comments

def insert(self, point):
    """
    Inserts a `Point` into the quadtree.

    Args:
        point (Point|tuple|None): The point to insert.
        data (any): Optional. Corresponding data for that point. Default
            is `None`.

    Returns:
        bool: `True` if insertion succeeded, otherwise `False`.
    """
    pnt = self.convert_to_point(point)
    # pnt.data = data
    return self._root.insert(pnt)

In the insert() of class QuadTree, suggest to remove the "data=None" in the insert and delete "pnt.data=data".

Sorry for the code format and hope this helps!

LeiMazizizi avatar Jul 11 '21 22:07 LeiMazizizi