Re: [Numpy-discussion] Python version support for NumPy 1.2

2008-07-16 Thread Charles R Harris
On Wed, Jul 16, 2008 at 10:37 PM, Alan McIntyre <[EMAIL PROTECTED]> wrote: > Which versions of Python are to be officially supported by NumPy 1.2? > I've been working against 2.5 and testing against 2.4 occasionally, > but 2.3 still has some issues I need to address (or at least that was > the cas

[Numpy-discussion] Python version support for NumPy 1.2

2008-07-16 Thread Alan McIntyre
Which versions of Python are to be officially supported by NumPy 1.2? I've been working against 2.5 and testing against 2.4 occasionally, but 2.3 still has some issues I need to address (or at least that was the case the last time I checked). ___ Numpy-di

Re: [Numpy-discussion] Monkeypatching vs nose plugin?

2008-07-16 Thread Fernando Perez
On Wed, Jul 16, 2008 at 8:21 PM, Alan McIntyre <[EMAIL PROTECTED]> wrote: > The monkeypatching approach was the first one that I could make to > work with the least amount of hassle, but it's definitely not the best > way. I only had to monkeypatch a couple of things at first, but as I > figured

Re: [Numpy-discussion] Monkeypatching vs nose plugin?

2008-07-16 Thread Robert Kern
On Wed, Jul 16, 2008 at 22:52, Alan McIntyre <[EMAIL PROTECTED]> wrote: > On Wed, Jul 16, 2008 at 11:32 PM, Robert Kern <[EMAIL PROTECTED]> wrote: >>> Since we're discussing this sort of thing, there's something I've been >>> meaning to ask anyway: do we really need to allow end users to pass in >>

Re: [Numpy-discussion] Monkeypatching vs nose plugin?

2008-07-16 Thread Alan McIntyre
On Wed, Jul 16, 2008 at 11:32 PM, Robert Kern <[EMAIL PROTECTED]> wrote: >> Since we're discussing this sort of thing, there's something I've been >> meaning to ask anyway: do we really need to allow end users to pass in >> arbitrary extra arguments to nose (via the extra_argv in test())? >> This s

Re: [Numpy-discussion] Monkeypatching vs nose plugin?

2008-07-16 Thread Robert Kern
On Wed, Jul 16, 2008 at 22:21, Alan McIntyre <[EMAIL PROTECTED]> wrote: > On Wed, Jul 16, 2008 at 10:00 PM, Robert Kern <[EMAIL PROTECTED]> wrote: >> Is there a way to do it programatically without requiring numpy to be >> installed with setuptools? > > There is; you have to pass a list of plugin i

Re: [Numpy-discussion] Monkeypatching vs nose plugin?

2008-07-16 Thread Alan McIntyre
On Wed, Jul 16, 2008 at 10:00 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > Is there a way to do it programatically without requiring numpy to be > installed with setuptools? There is; you have to pass a list of plugin instances to the constructor of TestProgram--all plugins that you might want to

Re: [Numpy-discussion] Monkeypatching vs nose plugin?

2008-07-16 Thread Fernando Perez
On Wed, Jul 16, 2008 at 7:00 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > Is there a way to do it programatically without requiring numpy to be > installed with setuptools? I think so, though I'm not 100% certain because I haven't finished the ipython work. So far what I have for ip is all nose

Re: [Numpy-discussion] Monkeypatching vs nose plugin?

2008-07-16 Thread Robert Kern
On Wed, Jul 16, 2008 at 20:42, Fernando Perez <[EMAIL PROTECTED]> wrote: > Howdy, > > In working on the ipython testing machinery, I looked at the numpy > nosetester.py file and found that it works by monkeypatching nose > itself. I'm curious as to why this approach was taken rather than > constr

[Numpy-discussion] Monkeypatching vs nose plugin?

2008-07-16 Thread Fernando Perez
Howdy, In working on the ipython testing machinery, I looked at the numpy nosetester.py file and found that it works by monkeypatching nose itself. I'm curious as to why this approach was taken rather than constructing a plugin object. In general, monkeypatching should be done as a last-resort

Re: [Numpy-discussion] NumPy date/time types and the resolu tion concept

2008-07-16 Thread Matt Knox
> Maybe you are right, but by providing many resolutions we are trying to > cope with the needs of people that are using them a lot. In > particular, we are willing that the authors of the timseries scikit can > find on these new dtype a fair replacement of their Date class (our > proposal wil

Re: [Numpy-discussion] Numpy Advanced Indexing Question

2008-07-16 Thread Fernando Perez
On Wed, Jul 16, 2008 at 4:08 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > Ah, okay. It's a bit tricky, though. Yes, you need to use fancy > indexing. Since axis you want to be index fancifully is not the first > one, you have to be more explicit than you might otherwise want. For > example, it wou

Re: [Numpy-discussion] Numpy Advanced Indexing Question

2008-07-16 Thread Robert Kern
On Wed, Jul 16, 2008 at 17:12, <[EMAIL PROTECTED]> wrote: > Robert, > > I can understand how this works if K is a constant time value but in my case > K varies at each location in the two-dimensional slice. In other words, if I > was doing this in a for loop I would do something like this > > fo

Re: [Numpy-discussion] svd

2008-07-16 Thread Charles Doutriaux
doh... Thanks Charles... I guess I've been staring at this code for too long now... C. Charles R Harris wrote: > > > On Wed, Jul 16, 2008 at 3:58 PM, Charles Doutriaux > <[EMAIL PROTECTED] > wrote: > > Hello, > > I'm using 1.1.0 and I have a bizarre thing happ

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Alan G Isaac
On Wed, 16 Jul 2008, Christopher Barker apparently wrote: > Indentation is syntax in python -- we do need to all do it > the same way, and four spaces is the standard -- there > simply isn't another reasonable option if you want o share > code with anyone else. Last comment (since this has al

Re: [Numpy-discussion] Numpy Advanced Indexing Question

2008-07-16 Thread Jack.Cook
Robert, I can understand how this works if K is a constant time value but in my case K varies at each location in the two-dimensional slice. In other words, if I was doing this in a for loop I would do something like this for i in range(numI): for j in range(numJ): k = slice(i,j)

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Stéfan van der Walt
2008/7/16 Christopher Barker <[EMAIL PROTECTED]>: > Indentation is syntax in python -- we do need to all do it the same way, > and four spaces is the standard -- there simply isn't another reasonable > option if you want o share code with anyone else. I agree. Let's just end this thread here. It

Re: [Numpy-discussion] svd

2008-07-16 Thread Charles R Harris
On Wed, Jul 16, 2008 at 3:58 PM, Charles Doutriaux <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using 1.1.0 and I have a bizarre thing happening > > it seems as if: > doing: > import numpy > SVD = numpy.linalg.svd > > if different as doing > import numpy.oldnumeric.linear_algebra > SVD = numpy.oldn

[Numpy-discussion] svd

2008-07-16 Thread Charles Doutriaux
Hello, I'm using 1.1.0 and I have a bizarre thing happening it seems as if: doing: import numpy SVD = numpy.linalg.svd if different as doing import numpy.oldnumeric.linear_algebra SVD = numpy.oldnumeric.linear_algebra.singular_value_decomposition In the first case passing an array (204,1484) re

Re: [Numpy-discussion] Numpy Advanced Indexing Question

2008-07-16 Thread Robert Kern
On Wed, Jul 16, 2008 at 16:45, <[EMAIL PROTECTED]> wrote: > Greetings, > > I have an I,J,K 3D volume of amplitude values at regularly sampled time > intervals. I have an I,J 2D slice which contains a time (K) value at each I, > J location. What I would like to do is extract a subvolume at a consta

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Christopher Barker
Alan G Isaac wrote: > It is only a recommendation: > http://www.python.org/dev/peps/pep-0008/ > (And a misguided one at that. ;-) ) Maybe so, but it is indeed more than a recommendation, it is a de-facto standard. If Python had never allowed mixed tabs and spaces, it might be OK to use tabs for

[Numpy-discussion] Masked arrays and pickle/unpickle

2008-07-16 Thread Anthony Floyd
We have an application that has previously used masked arrays from Numpy 1.0.3. Part of saving files from that application involved pickling data types that contained these masked arrays. In the latest round of library updates, we've decided to move to the most recent version of matplotlib, which

[Numpy-discussion] Numpy Advanced Indexing Question

2008-07-16 Thread Jack.Cook
Greetings, I have an I,J,K 3D volume of amplitude values at regularly sampled time intervals. I have an I,J 2D slice which contains a time (K) value at each I, J location. What I would like to do is extract a subvolume at a constant +/- K window around the slice. Is there an easy way to do thi

Re: [Numpy-discussion] Ticket #837

2008-07-16 Thread Charles R Harris
On Wed, Jul 16, 2008 at 3:05 PM, Pauli Virtanen <[EMAIL PROTECTED]> wrote: > > http://scipy.org/scipy/numpy/ticket/837 > > Infinite loop in fromfile and fromstring with sep=' ' and malformed input. > > I committed a fix to trunk. Does this need a 1.1.1 backport? > Yes, I think so. TIA, Chuck ___

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Charles R Harris
On Wed, Jul 16, 2008 at 2:48 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Wed, 16 Jul 2008, Charles R Harris apparently wrote: > > the python standard is four spaces > > It is only a recommendation: > http://www.python.org/dev/peps/pep-0008/ > (And a misguided one at that. ;-) ) > I see your

Re: [Numpy-discussion] Ticket review: #848, leak in PyArray_DescrFromType

2008-07-16 Thread Stéfan van der Walt
2008/7/16 Charles R Harris <[EMAIL PROTECTED]>: > Yes, there does look to be a memory leak here. Not to mention a missing NULL > check since PyArray_Scalar not only doesn't swallow a reference, it can't > take a Null value for desc. But the whole function is such a mess I want to > see if we can re

[Numpy-discussion] Ticket #837

2008-07-16 Thread Pauli Virtanen
http://scipy.org/scipy/numpy/ticket/837 Infinite loop in fromfile and fromstring with sep=' ' and malformed input. I committed a fix to trunk. Does this need a 1.1.1 backport? -- Pauli Virtanen ___ Numpy-discussion mailing list Numpy-discussion@scip

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Alan G Isaac
On Wed, 16 Jul 2008, Charles R Harris apparently wrote: > the python standard is four spaces It is only a recommendation: http://www.python.org/dev/peps/pep-0008/ (And a misguided one at that. ;-) ) Cheers, Alan Isaac ___ Numpy-discussion mailing l

Re: [Numpy-discussion] Ticket review #850: leak in _strings_richcompare

2008-07-16 Thread Charles R Harris
On Tue, Jul 15, 2008 at 1:50 AM, Michael Abbott <[EMAIL PROTECTED]> wrote: > This one is easy, ought to go in. Fixes a (not particularly likely) > memory leak. > ___ Done and backported. Chuck ___ Numpy-discussion mailing list Numpy-discussion@sc

Re: [Numpy-discussion] kinds

2008-07-16 Thread Charles Doutriaux
Thx Pierre, That's exactly what i was looking for C. Pierre GM wrote: > On Wednesday 16 July 2008 15:08:59 Charles Doutriaux wrote: > > >> and a bunch of similar flags that would basically tell you the limits on >> the machine you're running (or at least compiled on) >> >> Any idea on how to

Re: [Numpy-discussion] Ticket review #849: reference to deallocated object?

2008-07-16 Thread Charles R Harris
On Tue, Jul 15, 2008 at 1:53 AM, Michael Abbott <[EMAIL PROTECTED]> wrote: > Tenuous but easy fix, and conformant to style elsewhere. > This one depends on whether there is some sort of threading going on that can interrupt in the middle of the call. Probably not, but the fix doesn't look disrupt

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Charles R Harris
On Wed, Jul 16, 2008 at 1:33 PM, Michael Abbott <[EMAIL PROTECTED]> wrote: > On Wed, 16 Jul 2008, Alan G Isaac wrote: > > On Wed, 16 Jul 2008, Charles R Harris apparently wrote: > Michael Abbott actually wrote: > > > Hard tab characters are fortunately relatively rare in > > > numpy source > > h

Re: [Numpy-discussion] Ticket review: #848, leak in PyArray_DescrFromType

2008-07-16 Thread Charles R Harris
On Tue, Jul 15, 2008 at 9:28 AM, Michael Abbott <[EMAIL PROTECTED]> wrote: > On Tue, 15 Jul 2008, Michael Abbott wrote: > > Only half of my patch for this bug has gone into trunk, and without the > > rest of my patch there remains a leak. > > I think I might need to explain a little more about the

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Michael Abbott
On Wed, 16 Jul 2008, Alan G Isaac wrote: > On Wed, 16 Jul 2008, Charles R Harris apparently wrote: Michael Abbott actually wrote: > > Hard tab characters are fortunately relatively rare in > > numpy source > http://www.rizzoweb.com/java/tabs-vs-spaces.html Ha ha ha! I'm not going to rise to t

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Alan G Isaac
On Wed, 16 Jul 2008, Charles R Harris apparently wrote: > Hard tab characters are fortunately relatively rare in > numpy source http://www.rizzoweb.com/java/tabs-vs-spaces.html Cheers, Alan Isaac ___ Numpy-discussion mailing list Numpy-discussion

Re: [Numpy-discussion] kinds

2008-07-16 Thread Pierre GM
On Wednesday 16 July 2008 15:08:59 Charles Doutriaux wrote: > and a bunch of similar flags that would basically tell you the limits on > the machine you're running (or at least compiled on) > > Any idea on how to reproduce this? Charels, have you tried numpy.finfo ? That should give you informati

Re: [Numpy-discussion] Ticket review: #843

2008-07-16 Thread Charles R Harris
On Tue, Jul 15, 2008 at 1:42 AM, Michael Abbott <[EMAIL PROTECTED]> wrote: > I'm reviewing my tickets (seems a good thing to do with a release > imminent), and I'll post up each ticket that merits comment as a separate > message. > > Ticket #843 has gone into trunk (commit 5361, oliphant) ... but

[Numpy-discussion] kinds

2008-07-16 Thread Charles Doutriaux
Hello, A long long time ago, there used to be this module named "kinds" It's totally outdated nowdays but it had one nice functionality and i was wondering if you knew how to reproduce that it was: maxexp=kinds.default_float_kind.MAX_10_EXP minexp=kinds.default_float_kind.MIN_10_EXP and a bunc

Re: [Numpy-discussion] Second revised list of backports for 1.1.1.

2008-07-16 Thread Fernando Perez
On Wed, Jul 16, 2008 at 9:50 AM, Charles R Harris > OK. Done. Fantastic, many thanks. Cheers, f ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Histogram bin definition

2008-07-16 Thread David Huard
Hi Stefan, It's designed this way. The main reason is that the default bin edges are generated using linspace(a.min(), a.max(), bin) when bin is an integer. If we leave the rightmost edge open, then the histogram of a 100 items array will typically yield an histogram with 99 values because the

Re: [Numpy-discussion] Second revised list of backports for 1.1.1.

2008-07-16 Thread Charles R Harris
On Tue, Jul 15, 2008 at 11:31 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: > Hi Chuck, > > On Tue, Jul 15, 2008 at 8:41 PM, Charles R Harris > <[EMAIL PROTECTED]> wrote: > > After the second pass only a few remain. Fernando, if you don't get to > these > > I'll do them tomorrow. > > > > fperez >

[Numpy-discussion] RFC: A (second) proposal for implementing some date/time types in NumPy

2008-07-16 Thread Francesc Alted
Hi, After tons of excellent feedback received for our first proposal about the date/time types in NumPy Ivan and me have had another brainstorming session and ended with a new proposal for your consideration. While this one does not reap all and every of the suggestions you have made, we think

Re: [Numpy-discussion] Recommendations for using numpy ma?

2008-07-16 Thread Pierre GM
On Wednesday 16 July 2008 12:28:40 Russell E. Owen wrote: > > If you really need support to ancient versions of numpy, just check the > > import try: > >import numpy.core.ma as ma > > except ImportError: > >import numpy as ma > > (I assume you mean the last line to be "import numpy .ma as m

Re: [Numpy-discussion] Recommendations for using numpy ma?

2008-07-16 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Pierre GM <[EMAIL PROTECTED]> wrote: > Russell, > > What used to be numpy.core.ma is now numpy.oldnumeric.ma, but this latter isd > no longer supported and will disappear soon as well. Just use numpy.ma > > If you really need support to ancient versions of numpy

Re: [Numpy-discussion] NumPy date/time types and the resolution concept

2008-07-16 Thread Francesc Alted
A Tuesday 15 July 2008, Anne Archibald escrigué: > 2008/7/15 Francesc Alted <[EMAIL PROTECTED]>: > > Maybe is only that. But by using the term 'frequency' I tend to > > think that you are expecting to have one entry (observation) in > > your array for each time 'tick' since time start. OTOH, the

[Numpy-discussion] Histogram bin definition

2008-07-16 Thread Stéfan van der Walt
Hi all, I am busy documenting `histogram`, and the definition of a "bin" eludes me. Here is the behaviour that troubles me: >>> np.histogram([1,2,1], bins=[0, 1, 2, 3], new=True) (array([0, 2, 1]), array([0, 1, 2, 3])) >From this result, it seems as if a bin is defined as the half-open interval

Re: [Numpy-discussion] Infinity definitions

2008-07-16 Thread Zachary Pincus
>> Hi, >> Following Travis's suggestion below, I would like to suggest that the >> following definitions be depreciated or removed in this forthcoming >> release: >> >> numpy.Inf >> numpy.Infinity >> numpy.infty >> numpy.PINF >> numpy.NAN >> numpy.NaN > ... > > While this is being discussed, what a