Code Monkey home page Code Monkey logo

kdtree-in-python's Introduction

Tsoding Build Status

Source Code for K-d tree in Python series

https://www.youtube.com/playlist?list=PLguYJK7ydFE7R7KqRRVXw23kOrn6jiwqi

Quick Start

Install Python 3

$ python main.py   # Perform the tests

Contribution

If you are willing so submit a Pull Request, please keep in mind that this code should not deviate too much from the code we have written in the K-d tree series. It would be very strange if after watching the videos people came to this repo and saw completely different code. Because of that any refactoring contributions may be rejected without any discussion, sorry.

Please submit only bug fixes.

kdtree-in-python's People

Contributors

peteryland avatar rexim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kdtree-in-python's Issues

TypeError: list indices must be integers or slices, not float


TypeError Traceback (most recent call last)
in ()
----> 1 kdtree = build_kdtree(points)

in build_kdtree(points, depth)
10
11 return {
---> 12 'point': sorted_points[n / 2],
13 'left': build_kdtree(sorted_points[:n / 2], depth + 1),
14 'right': build_kdtree(sorted_points[n/2 + 1:], depth + 1)

TypeError: list indices must be integers or slices, not float

3D implementation

Is there any plans to implement 3D not only 2D version of KDTree?

An error while trying to use points.svg

Dear Tsoding,

I am watching your video and I am trying to duplicate your result. But I stumble on a problem with your file points.svg. Whatever the software I use (Inksape, Gim or Firefox), I receive an error of parsing like this one from Firefox:


Analysis error XML :badly form
Path : file:///D:/Cours/Cours%20Data-Driven%20Astronomy/Week_2/points.svg
line number 53, Colomne 69 :


Can you help me on this please? I would really appreciate your help.
Thanks in advance
Mario

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.