Re: [Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Robert Kern
Christopher Barker wrote: > Yes, the docs could be clearer (and thanks Ann, that's better), but I'm > not sure that's the core problem > >> +If x and y are not given, condition.nonzero() is returned. This has >> +the effect of returning a tuple suitable for fancy indexing. > > Why i

[Numpy-discussion] Documentation

2007-09-12 Thread Charles R Harris
Hi All, While doing documentation, I've run into the need for a simple word to express the fact that a variable can be an array, or anything that can be converted to an array using asarray(). I have been using array_like for this kind of variable, but I am open to suggestions. Also, the current v

Re: [Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Christopher Barker
Yes, the docs could be clearer (and thanks Ann, that's better), but I'm not sure that's the core problem > +If x and y are not given, condition.nonzero() is returned. This has > +the effect of returning a tuple suitable for fancy indexing. Why is this a special case of where? This j

Re: [Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Anne Archibald
On 12/09/2007, Robert Kern <[EMAIL PROTECTED]> wrote: > That sentence applies to the 3-argument form, which has nothing to do with > nonzero() and does not yield a tuple. But in general, yes, the docstring > leaves > much to be desired. Well, here's what I hope is a step in the right direction.

Re: [Numpy-discussion] numpy.ndarrays as C++ arrays (wrapped with boost)

2007-09-12 Thread Neal Becker
Travis E. Oliphant wrote: > >> nd to copy hundres of MB around unnecessarily. >> >> I think it is a real shame that boost currently doesn't properly support >> numpy out of the box, although numpy has long obsoleted both numarray and >> Numeric (which is both buggy and completely unsupported). Al

Re: [Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Robert Kern
Fernando Perez wrote: > Hi all, > > A couple of times I've been confused by numpy.where(), and I think > part of it comes from the docstring. Searching my gmail archive seems > to indicate I'm not the only one bitten by this. > > Compare: > > In [14]: pdoc numpy.where > Class Docstring: > w

[Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Fernando Perez
Hi all, A couple of times I've been confused by numpy.where(), and I think part of it comes from the docstring. Searching my gmail archive seems to indicate I'm not the only one bitten by this. Compare: In [14]: pdoc numpy.where Class Docstring: where(condition, | x, y) The result is s

Re: [Numpy-discussion] pycdf probs

2007-09-12 Thread Trevor Law
I believe I have contacted them before at this address: [EMAIL PROTECTED] Trevor Law UC Irvine Undergraduate Student On 9/12/07, Mathew Yeates <[EMAIL PROTECTED]> wrote: > Anybody know how to contact the pycdf author? His name is Gosselin I > think. There are hardcoded values that cause pycdf to

Re: [Numpy-discussion] numpy.ndarrays as C++ arrays (wrapped with boost)

2007-09-12 Thread Matthieu Brucher
> > less than what? std:valarray, etc. all help with this. I do not agree with this statement. A correct memory managed array would increment and decrement a reference counter somewhere. Yes, it sure would be nice to build it on an existing code base, and > boost::multiarray seems to fit. T

[Numpy-discussion] pycdf probs

2007-09-12 Thread Mathew Yeates
Anybody know how to contact the pycdf author? His name is Gosselin I think. There are hardcoded values that cause pycdf to segfault when using large strings. Mathew ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.or

[Numpy-discussion] ANN: Reminder - Texas Python Regional Unconference

2007-09-12 Thread Travis Vaught
Greetings, Just a reminder for those in the area... http://pycamp.python.org/Texas/HomePage The Unconference is to be held this weekend (Saturday and Sunday, September 15, 16) at the Texas Learning & Computing Center at the University of Houston main campus. It's free. Sign up by adding yo

Re: [Numpy-discussion] numpy.ndarrays as C++ arrays (wrapped with boost)

2007-09-12 Thread Christopher Barker
David Cournapeau wrote: > Maybe I am naive, but I think a worthy goal would be a minimal C++ > library which wraps ndarray, without thinking about SWIG, boost and co > first. That's exactly what I had in mind. If you have something that works well with ndarray -- then SWIG et al. can work with

Re: [Numpy-discussion] Optimizing similarity matrix algorithm

2007-09-12 Thread Kurdt Bane
Er.. obviousl, when i wrote : "scan the similarity algorithm and find all the diagonals", I meant scan the "similarity matrix and find all the diagonals". "Similarity matrix" should really be called "Equality matrix", as I imagine it as a matrix with dimensions len(a) x len(b) where M[x][y] = (a[x

[Numpy-discussion] Optimizing similarity matrix algorithm

2007-09-12 Thread Kurdt Bane
Hi to all! For reverse engineering purposes, I need to find where every possible chunk of bytes in file A is contained in file B. Obviously, if a chunk of length n is contained in B, I dont' want my script to recognize also all the subchunks of size < n contained in the chunk. I coded a naive impl

Re: [Numpy-discussion] numpy.ndarrays as C++ arrays (wrapped with boost)

2007-09-12 Thread Alexander Schmolck
Christopher Barker <[EMAIL PROTECTED]> writes: > Alexander Schmolck wrote: >> I just saw a closely related question posted one >> week ago here (albeit mostly from a swig context). > > SWIG, Boost, whatever, the issues are similar. I guess what I'd love to > find is an array implementation that

Re: [Numpy-discussion] numpy.ndarrays as C++ arrays (wrapped with boost)

2007-09-12 Thread David Cournapeau
Christopher Barker wrote: > Alexander Schmolck wrote: >> I just saw a closely related question posted one >> week ago here (albeit mostly from a swig context). > > SWIG, Boost, whatever, the issues are similar. I guess what I'd love to > find is an array implementation that plays well with modern