Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Fernando Perez
On Fri, May 11, 2012 at 4:54 PM, Nathaniel Smith wrote: > I > have lying around my homedir that it would generally be a free speed > win Don't forget the case where the copy semantics may actually provide an *improvement* in performance by allowing a potentially large array to get deallocated if

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Fernando Perez
On Wed, May 16, 2012 at 7:10 AM, Nathaniel Smith wrote: > I tried checking this before, actually, but can't figure out how to > build scipy against a copy of numpy that is installed in either a > virtualenv or just on PYTHONPATH. (Basically, I just don't want to > install some random development n

Re: [Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-16 Thread Ralf Gommers
On Wed, May 16, 2012 at 7:01 PM, Fabrice Silva wrote: > > maybe it's this > > > http://thread.gmane.org/gmane.comp.python.numeric.general/49785/focus=49787 > Thanks for your reply, Not sure it is the same trouble, I'll have a > deeper look at that thread... > > Both coverage=True and coverage=Fals

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Travis Oliphant
This Pull Request looks like a good idea to me as well. -Travis On May 16, 2012, at 3:10 PM, Ralf Gommers wrote: > > > On Wed, May 16, 2012 at 3:55 PM, Nathaniel Smith wrote: > On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien wrote: > > Hi, > > > > In fact, I would arg to never change

Re: [Numpy-discussion] Debian/Ubuntu patch help

2012-05-16 Thread Ralf Gommers
On Wed, May 16, 2012 at 9:57 PM, Julian Taylor < jtaylor.deb...@googlemail.com> wrote: > On 05/16/2012 09:01 PM, Ralf Gommers wrote: > > > > > > On Tue, May 15, 2012 at 10:35 PM, Julian Taylor > > mailto:jtaylor.deb...@googlemail.com>> > > wrote: > > > > > Hi, if there's anyone wants to have a

Re: [Numpy-discussion] Debian/Ubuntu patch help (was: ANN: NumPy 1.6.2 release candidate 1)

2012-05-16 Thread Ralf Gommers
On Wed, May 16, 2012 at 10:41 PM, Sandro Tosi wrote: > Hello, > > On Wed, May 16, 2012 at 9:01 PM, Ralf Gommers > wrote: > > > > > > On Tue, May 15, 2012 at 10:35 PM, Julian Taylor > > wrote: > >> > >> > Hi, if there's anyone wants to have a look at the above issue this > >> > week, > >> >that

Re: [Numpy-discussion] Debian/Ubuntu patch help (was: ANN: NumPy 1.6.2 release candidate 1)

2012-05-16 Thread Sandro Tosi
Hello, On Wed, May 16, 2012 at 9:01 PM, Ralf Gommers wrote: > > > On Tue, May 15, 2012 at 10:35 PM, Julian Taylor > wrote: >> >> > Hi, if there's anyone wants to have a look at the above issue this >> > week, >> >that would be great. >> >> > If there's a patch by this weekend I can create a seco

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Travis Oliphant
On May 13, 2012, at 3:11 AM, Nathaniel Smith wrote: > On Sun, May 13, 2012 at 3:28 AM, Travis Oliphant wrote: >> Another approach would be to introduce a method: >> >> a.diag(copy=False) >> >> and leave a.diagonal() alone. Then, a.diagonal() could be deprecated over >> 2-3 releases. > > This

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Ralf Gommers
On Wed, May 16, 2012 at 3:55 PM, Nathaniel Smith wrote: > On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien wrote: > > Hi, > > > > In fact, I would arg to never change the current behavior, but add the > > flag for people that want to use it. > > > > Why? > > > > 1) There is probably >10k script

Re: [Numpy-discussion] Debian/Ubuntu patch help

2012-05-16 Thread Julian Taylor
On 05/16/2012 09:01 PM, Ralf Gommers wrote: > > > On Tue, May 15, 2012 at 10:35 PM, Julian Taylor > mailto:jtaylor.deb...@googlemail.com>> > wrote: > > > Hi, if there's anyone wants to have a look at the above issue this > > week, > >that would be great. > > > If there's a patch

[Numpy-discussion] tracing numpy data allocation with python callbacks

2012-05-16 Thread Thouis Jones
I recently had need of tracing numpy data allocation/deallocation. I was unable to find a simple way to do so, and so ended up putting the code below into ndarraytypes.h to allow me to trace allocations. A key part is that this jumps back into python, so I can inspect the stack and find out where

Re: [Numpy-discussion] Debian/Ubuntu patch help (was: ANN: NumPy 1.6.2 release candidate 1)

2012-05-16 Thread Ralf Gommers
On Tue, May 15, 2012 at 10:35 PM, Julian Taylor < jtaylor.deb...@googlemail.com> wrote: > > Hi, if there's anyone wants to have a look at the above issue this > > week, > >that would be great. > > > If there's a patch by this weekend I can create a second RC, so we can > > still have the final rel

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Nathaniel Smith
On Wed, May 16, 2012 at 3:04 PM, Benjamin Root wrote: > > > On Wed, May 16, 2012 at 9:55 AM, Nathaniel Smith wrote: >> >> On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien wrote: >> > Hi, >> > >> > In fact, I would arg to never change the current behavior, but add the >> > flag for people that w

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Nathaniel Smith
On Wed, May 16, 2012 at 4:50 PM, Robert Kern wrote: > On Wed, May 16, 2012 at 4:35 PM, Nathaniel Smith wrote: >> On Wed, May 16, 2012 at 4:24 PM, Robert Kern wrote: >>> On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith wrote: >>> I built some pristine python 2.7 installs from scratch (no vi

Re: [Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-16 Thread Fabrice Silva
> maybe it's this > http://thread.gmane.org/gmane.comp.python.numeric.general/49785/focus=49787 Thanks for your reply, Not sure it is the same trouble, I'll have a deeper look at that thread... > It helped in my case, and I don't have a problem running the tests > with your mypackage (using my pat

Re: [Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-16 Thread josef . pktd
On Wed, May 16, 2012 at 11:05 AM, Fabrice Silva wrote: > Hi, > I am getting into troubles when using numpy.testing with coverage. A > minimal example package is atached to this email. Unpack and run: > > $ python -c "import mypackage; mypackage.test(verbose=10,coverage=False)" > $ python -c "impor

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Skipper Seabold
On Wed, May 16, 2012 at 11:50 AM, Robert Kern wrote: > On Wed, May 16, 2012 at 4:35 PM, Nathaniel Smith wrote: >> On Wed, May 16, 2012 at 4:24 PM, Robert Kern wrote: >>> On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith wrote: >>> I built some pristine python 2.7 installs from scratch (no v

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Robert Kern
On Wed, May 16, 2012 at 4:35 PM, Nathaniel Smith wrote: > On Wed, May 16, 2012 at 4:24 PM, Robert Kern wrote: >> On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith wrote: >> >>> I built some pristine python 2.7 installs from scratch (no virtualenv, >>> no distro tweaks, etc.). Then I installed som

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Nathaniel Smith
On Wed, May 16, 2012 at 4:24 PM, Robert Kern wrote: > On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith wrote: > >> I built some pristine python 2.7 installs from scratch (no virtualenv, >> no distro tweaks, etc.). Then I installed some version of numpy in >> each, then tried building scipy. With

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Robert Kern
On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith wrote: > I built some pristine python 2.7 installs from scratch (no virtualenv, > no distro tweaks, etc.). Then I installed some version of numpy in > each, then tried building scipy. With numpy 1.6.1 (built from git), > everything seems fine - it

[Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Nathaniel Smith
On Wed, May 16, 2012 at 3:15 PM, Robert Kern wrote: > On Wed, May 16, 2012 at 3:10 PM, Nathaniel Smith wrote: >> On Wed, May 16, 2012 at 3:04 PM, Benjamin Root wrote: > >>> Just as a sanity check, do the scipy tests run without producing any such >>> messages? >> >> I tried checking this before,

[Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-16 Thread Fabrice Silva
Hi, I am getting into troubles when using numpy.testing with coverage. A minimal example package is atached to this email. Unpack and run: $ python -c "import mypackage; mypackage.test(verbose=10,coverage=False)" $ python -c "import mypackage; mypackage.test(verbose=10,coverage=True)" Some explan

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Robert Kern
On Wed, May 16, 2012 at 3:10 PM, Nathaniel Smith wrote: > On Wed, May 16, 2012 at 3:04 PM, Benjamin Root wrote: >> Just as a sanity check, do the scipy tests run without producing any such >> messages? > > I tried checking this before, actually, but can't figure out how to > build scipy against

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Nathaniel Smith
On Wed, May 16, 2012 at 3:04 PM, Benjamin Root wrote: > > > On Wed, May 16, 2012 at 9:55 AM, Nathaniel Smith wrote: >> >> On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien wrote: >> > Hi, >> > >> > In fact, I would arg to never change the current behavior, but add the >> > flag for people that w

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Benjamin Root
On Wed, May 16, 2012 at 9:55 AM, Nathaniel Smith wrote: > On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien wrote: > > Hi, > > > > In fact, I would arg to never change the current behavior, but add the > > flag for people that want to use it. > > > > Why? > > > > 1) There is probably >10k script

Re: [Numpy-discussion] Fancy-indexing reorders output in corner cases?

2012-05-16 Thread Nathaniel Smith
On Tue, May 15, 2012 at 5:03 AM, Travis Oliphant wrote: > So, the behavior is actually quite predictable, it's just that in some common > cases it doesn't do what you would expect --- especially if you think that > [0,1] is "the same" as :2.   When I wrote this code to begin with I should > hav

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Nathaniel Smith
On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien wrote: > Hi, > > In fact, I would arg to never change the current behavior, but add the > flag for people that want to use it. > > Why? > > 1) There is probably >10k script that use it that will need to be > checked for correctness. There won't be

[Numpy-discussion] masked and missing values, a historical perspective and some comments

2012-05-16 Thread Pierre GM
All, I’ve been fairly quiet on the various missing/masked values proposals, sorry about that. I figured I would take the opportunity of Travis O.’s deadline of Wed. 16th to put some aspects of numpy.ma in a semi-historical, semi-personal perspective. Apologies in advance if I misrepresent some asp