Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-17 Thread Gael Varoquaux
On Tue, Jul 17, 2012 at 09:55:28AM -0700, Jake Vanderplas wrote: > I did a bit more experimentation, and it looks like memoryviews with > boundscheck and wraparound turned off are largely comparable to pointers > for *pure indexing*. Slicing is what kills things. Ha, that's useful information.

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-17 Thread Jake Vanderplas
On 07/17/2012 09:20 AM, Gael Varoquaux wrote: > On Tue, Jul 17, 2012 at 09:01:28AM -0700, Jake Vanderplas wrote: >> I put this together really quickly this morning - let me know if you see >> anything I missed that makes the comparisons unfair. > You're at scipy, aren't you? Maybe it would be usefu

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-17 Thread Gael Varoquaux
On Tue, Jul 17, 2012 at 09:01:28AM -0700, Jake Vanderplas wrote: > I put this together really quickly this morning - let me know if you see > anything I missed that makes the comparisons unfair. You're at scipy, aren't you? Maybe it would be useful to grab some of the cython folks to have their i

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-17 Thread Olivier Grisel
2012/7/17 Jake Vanderplas : > On 07/16/2012 11:56 PM, Andreas Mueller wrote: >> On 07/17/2012 07:40 AM, Olivier Grisel wrote: >>> 2012/7/16 Andreas Mueller : On 07/16/2012 09:55 PM, Gael Varoquaux wrote: > On Mon, Jul 16, 2012 at 01:13:55PM -0700, Jake Vanderplas wrote: >> How do folks

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-17 Thread Peter Prettenhofer
seems like the pointer kung-fu pays off Thanks Jake! 2012/7/17 Jake Vanderplas : > On 07/16/2012 11:56 PM, Andreas Mueller wrote: >> On 07/17/2012 07:40 AM, Olivier Grisel wrote: >>> 2012/7/16 Andreas Mueller : On 07/16/2012 09:55 PM, Gael Varoquaux wrote: > On Mon, Jul 16, 2012 at 01:13

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-17 Thread Jake Vanderplas
On 07/16/2012 11:56 PM, Andreas Mueller wrote: > On 07/17/2012 07:40 AM, Olivier Grisel wrote: >> 2012/7/16 Andreas Mueller : >>> On 07/16/2012 09:55 PM, Gael Varoquaux wrote: On Mon, Jul 16, 2012 at 01:13:55PM -0700, Jake Vanderplas wrote: > How do folks feel about using this sort of blee

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-16 Thread Andreas Mueller
On 07/17/2012 07:40 AM, Olivier Grisel wrote: > 2012/7/16 Andreas Mueller : >> On 07/16/2012 09:55 PM, Gael Varoquaux wrote: >>> On Mon, Jul 16, 2012 at 01:13:55PM -0700, Jake Vanderplas wrote: How do folks feel about using this sort of bleeding-edge cython syntax in scikit-learn? >>> I w

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-16 Thread Gael Varoquaux
On Tue, Jul 17, 2012 at 08:40:31AM +0200, Olivier Grisel wrote: > Still for new code I think it's better to use memoryviews rather than > manual pointer manipulation that is prone to segfaulting. I agree. G -- Live Secur

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-16 Thread Olivier Grisel
2012/7/16 Andreas Mueller : > On 07/16/2012 09:55 PM, Gael Varoquaux wrote: >> On Mon, Jul 16, 2012 at 01:13:55PM -0700, Jake Vanderplas wrote: >>> How do folks feel about using this sort of bleeding-edge cython syntax >>> in scikit-learn? >> I wouldn't mind waiting another year: it's not like we d

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-16 Thread Andreas Mueller
On 07/16/2012 09:55 PM, Gael Varoquaux wrote: > On Mon, Jul 16, 2012 at 01:13:55PM -0700, Jake Vanderplas wrote: >> How do folks feel about using this sort of bleeding-edge cython syntax >> in scikit-learn? > I wouldn't mind waiting another year: it's not like we don't have plenty > of things to do

Re: [Scikit-learn-general] BallTree and memoryviews

2012-07-16 Thread Gael Varoquaux
On Mon, Jul 16, 2012 at 01:13:55PM -0700, Jake Vanderplas wrote: > How do folks feel about using this sort of bleeding-edge cython syntax > in scikit-learn? I wouldn't mind waiting another year: it's not like we don't have plenty of things to do, and there is no urgency. That's my typical respon

[Scikit-learn-general] BallTree and memoryviews

2012-07-16 Thread Jake Vanderplas
Hello, There has been some interesting discussion regarding cKDTree recently on the scipy-dev list (see thread starting at http://mail.scipy.org/pipermail/scipy-dev/2012-July/017737.html) and I've been reading it with a lot of interest. Based on what Sturla is saying within these messages, the