[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

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 no...@nouiz.org 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

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 tra...@continuum.io 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

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 n...@pobox.com wrote: On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien no...@nouiz.org 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

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 ben.r...@ou.edu wrote: On Wed, May 16, 2012 at 9:55 AM, Nathaniel Smith n...@pobox.com wrote: On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien no...@nouiz.org wrote: Hi, In fact, I would arg to never change the current behavior, but add

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 n...@pobox.com wrote: On Wed, May 16, 2012 at 3:04 PM, Benjamin Root ben.r...@ou.edu 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

[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

[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 robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 3:10 PM, Nathaniel Smith n...@pobox.com wrote: On Wed, May 16, 2012 at 3:04 PM, Benjamin Root ben.r...@ou.edu wrote: Just as a sanity check, do the scipy tests run without producing any such

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 n...@pobox.com 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

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 robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith n...@pobox.com 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

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 n...@pobox.com wrote: On Wed, May 16, 2012 at 4:24 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith n...@pobox.com wrote: I built some pristine python 2.7 installs from scratch (no virtualenv, no

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 robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:35 PM, Nathaniel Smith n...@pobox.com wrote: On Wed, May 16, 2012 at 4:24 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith n...@pobox.com wrote: I

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 si...@lma.cnrs-mrs.fr 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) $

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

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 robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:35 PM, Nathaniel Smith n...@pobox.com wrote: On Wed, May 16, 2012 at 4:24 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith n...@pobox.com wrote: I

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 ben.r...@ou.edu wrote: On Wed, May 16, 2012 at 9:55 AM, Nathaniel Smith n...@pobox.com wrote: On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien no...@nouiz.org wrote: Hi, In fact, I would arg to never change the current behavior, but add

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 release before

[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

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 jtaylor.deb...@googlemail.com 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

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 n...@pobox.com wrote: On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien no...@nouiz.org 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

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 tra...@continuum.io 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.

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 ralf.gomm...@googlemail.com wrote: 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

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 matrixh...@gmail.com wrote: Hello, On Wed, May 16, 2012 at 9:01 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Tue, May 15, 2012 at 10:35 PM, Julian Taylor jtaylor.deb...@googlemail.com wrote: Hi, if there's anyone wants to

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 jtaylor.deb...@googlemail.com mailto:jtaylor.deb...@googlemail.com wrote: Hi, if there's anyone

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 n...@pobox.com wrote: On Tue, May 15, 2012 at 2:49 PM, Frédéric Bastien no...@nouiz.org wrote: Hi, In fact, I would

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 si...@lma.cnrs-mrs.frwrote: 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

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 n...@pobox.com 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

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 n...@pobox.com 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