[SciPy-Dev] Another Bug in KDTree

Ralf Gommers ralf.gommers at googlemail.com
Thu Jan 27 06:02:36 EST 2011


On Wed, Jan 26, 2011 at 12:32 AM, Charles R. Schmidt <schmidtc at gmail.com>wrote:

> Has anyone been able to verify this bug? or know if it's already
> documented somewhere?
>

Same output on my system, looks like a bug. I don't think it's documented
anywhere, could you open a ticket for it?

Thanks,
Ralf


> Thanks,
> Charlie.
>
> On Wed, Jan 19, 2011 at 5:31 PM, Charles R. Schmidt <schmidtc at gmail.com>
> wrote:
> > There appears to be a bug in KDTree.query_ball_point, when using
> > integer points neighbor points that lie on the radius are not always
> > returned.
> >
> > Eg, with a 4x4 grid
> >>>> import scipy.spatial
> >>>> points = [(0, 0), (0, 1), (0, 2), (0, 3), \
> > ...              (1, 0), (1, 1), (1, 2), (1, 3), \
> > ...              (2, 0), (2, 1), (2, 2), (2, 3), \
> > ...              (3, 0), (3, 1), (3, 2), (3, 3)]
> >>>> kd=scipy.spatial.KDTree(points)
> >>>> kd.query_ball_point((2,0),1)
> > [8, 9, 12]
> >
> >
> >>>> points = [(0.0, 0.0), (0.0, 1.0), (0.0, 2.0), (0.0, 3.0), \
> > ...              (1.0, 0.0), (1.0, 1.0), (1.0, 2.0), (1.0, 3.0), \
> > ...              (2.0, 0.0), (2.0, 1.0), (2.0, 2.0), (2.0, 3.0), \
> > ...              (3.0, 0.0), (3.0, 1.0), (3.0, 2.0), (3.0, 3.0)]
> >
> >>>> kd=scipy.spatial.KDTree(points)
> >>>> kd.query_ball_point((2,0),1)
> > [4, 8, 9, 12]
> >
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20110127/732a97fc/attachment.html>


More information about the SciPy-Dev mailing list