Skip to content

Commit

Permalink
Merge pull request #28 from TennyZhuang/master
Browse files Browse the repository at this point in the history
preserve original list order
  • Loading branch information
stefankoegl committed Jun 25, 2016
2 parents 935db0c + 4cd0bc7 commit 090f32f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kdtree.py
Expand Up @@ -213,7 +213,8 @@ def __init__(self, data=None, left=None, right=None, axis=None,
sel_axis(axis) is used when creating subnodes of the current node. It
receives the axis of the parent node and returns the axis of the child
node. """

if type(data) == 'list':
data = list(data)
super(KDNode, self).__init__(data, left, right)
self.axis = axis
self.sel_axis = sel_axis
Expand Down

0 comments on commit 090f32f

Please sign in to comment.