Python Save Numpy Array To Binary Search Tree Code In Python