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

2012-05-23 Thread Luis Pedro Coelho
On one of my papers, we put up the code online. Years afterwards, I still get emails every six months or so because the version of the code which was used for the paper now returns the wrong result! The problem is that it was written for the old histogram and, although I have a new version of the

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

2012-05-23 Thread T J
On Wed, May 23, 2012 at 4:16 PM, Kathleen M Tacina < kathleen.m.tac...@nasa.gov> wrote: > ** > On Wed, 2012-05-23 at 17:31 -0500, Nathaniel Smith wrote: > > On Wed, May 23, 2012 at 10:53 PM, Travis Oliphant > wrote:> To be clear, I'm not opposed to the change, and it looks like we > should go f

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

2012-05-23 Thread Kathleen M Tacina
On Wed, 2012-05-23 at 17:31 -0500, Nathaniel Smith wrote: > On Wed, May 23, 2012 at 10:53 PM, Travis Oliphant wrote: > > To be clear, I'm not opposed to the change, and it looks like we should go > > forward. > > > > In my mind it's not about developers vs. users as satisfying users is the > >

[Numpy-discussion] ANN: EPD 7.3 (and 8 preview beta) released

2012-05-23 Thread Ilan Schnell
Hello, I am pleased to announce the release of Enthought Python Distribution, EPD version 7.3, along with its "EPD Free" counterpart. The highlights of this release are: the addition of enaml, Shapely and several other packages, as well as updates to over 30 packages, including SciPy and IPython.

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

2012-05-23 Thread Nathaniel Smith
On Wed, May 23, 2012 at 10:53 PM, Travis Oliphant wrote: > To be clear, I'm not opposed to the change, and it looks like we should go > forward. > > In my mind it's not about developers vs. users as satisfying users is the > whole point.   The purpose of NumPy is not to make its developers happy

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

2012-05-23 Thread Travis Oliphant
To be clear, I'm not opposed to the change, and it looks like we should go forward. In my mind it's not about developers vs. users as satisfying users is the whole point. The purpose of NumPy is not to make its developers happy :-). But, users also want there to *be* developers on NumPy

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

2012-05-23 Thread Olivier Delalleau
2012/5/23 Nathaniel Smith > On Wed, May 23, 2012 at 6:29 PM, Travis Oliphant > wrote: > > Then are you suggesting that we need to back out the changes to the > casting > > rules as well, because this will also cause code to stop working. This > is > > part of my point. We are not being consi

Re: [Numpy-discussion] command for retrieving unmasked data from a mask array?

2012-05-23 Thread Chao YUE
Thanks Olivier. it works. chao 2012/5/23 Olivier Delalleau > Should be dt3.compressed() > > -=- Olivier > > 2012/5/23 Chao YUE > >> Dear all, >> >> is there a command for retrieving unmasked data from a mask array? >> excepting using dt3[~dt3.mask].flatten()? >> >> thanks, >> >> Chao >> >> --

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

2012-05-23 Thread Nathaniel Smith
On Wed, May 23, 2012 at 6:29 PM, Travis Oliphant wrote: > Then are you suggesting that we need to back out the changes to the casting > rules as well, because this will also cause code to stop working.   This is > part of my point.   We are not being consistently cautious. I never understood exac

Re: [Numpy-discussion] Numpy inverse giving incorrect result

2012-05-23 Thread Pauli Virtanen
23.05.2012 11:22, shbr kirjoitti: > I am running the following script as a basic input-output model but the > inverse function is bringing back an incorrect result (I have checked this > by inputting the data manually).I am very new to python but I assume the > error occurs in how the data is gathe

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

2012-05-23 Thread Dag Sverre Seljebotn
On 05/23/2012 10:00 PM, Dag Sverre Seljebotn wrote: > On 05/23/2012 07:29 PM, Travis Oliphant wrote: >> >> On May 23, 2012, at 8:02 AM, Olivier Delalleau wrote: >> >>> 2012/5/23 Nathaniel Smithmailto:n...@pobox.com>> >>> >>> On Wed, May 23, 2012 at 6:06 AM, Travis Oliphant >>> mailto:tra.

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

2012-05-23 Thread Dag Sverre Seljebotn
On 05/23/2012 07:29 PM, Travis Oliphant wrote: > > On May 23, 2012, at 8:02 AM, Olivier Delalleau wrote: > >> 2012/5/23 Nathaniel Smith mailto:n...@pobox.com>> >> >> On Wed, May 23, 2012 at 6:06 AM, Travis Oliphant >> mailto:tra...@continuum.io>> wrote: >> > I just realized that the pul

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

2012-05-23 Thread Frédéric Bastien
On Wed, May 23, 2012 at 1:29 PM, Travis Oliphant wrote: > > Then are you suggesting that we need to back out the changes to the casting > rules as well, because this will also cause code to stop working.   This is > part of my point.   We are not being consistently cautious. The casting change ha

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

2012-05-23 Thread Olivier Delalleau
2012/5/23 Travis Oliphant > > On May 23, 2012, at 8:02 AM, Olivier Delalleau wrote: > > 2012/5/23 Nathaniel Smith > >> On Wed, May 23, 2012 at 6:06 AM, Travis Oliphant >> wrote: >> > I just realized that the pull request doesn't do what I thought it did >> which >> > is just add the flag to war

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

2012-05-23 Thread Travis Oliphant
On May 23, 2012, at 8:02 AM, Olivier Delalleau wrote: > 2012/5/23 Nathaniel Smith > On Wed, May 23, 2012 at 6:06 AM, Travis Oliphant wrote: > > I just realized that the pull request doesn't do what I thought it did which > > is just add the flag to warn users who are writing to an array that is

[Numpy-discussion] libnpysort.a and PyDataMem_NEW/FREE

2012-05-23 Thread Thouis (Ray) Jones
The "private" libnpysort.a (see https://github.com/numpy/numpy/pull/89 for its history) uses PyDataMem_NEW/FREE. I'm trying to convert these to actual functions to allow tracing numpy memory allocations (see https://github.com/numpy/numpy/pull/284). However, these new functions have to be in the

Re: [Numpy-discussion] command for retrieving unmasked data from a mask array?

2012-05-23 Thread Olivier Delalleau
Should be dt3.compressed() -=- Olivier 2012/5/23 Chao YUE > Dear all, > > is there a command for retrieving unmasked data from a mask array? > excepting using dt3[~dt3.mask].flatten()? > > thanks, > > Chao > > -- > > *

[Numpy-discussion] command for retrieving unmasked data from a mask array?

2012-05-23 Thread Chao YUE
Dear all, is there a command for retrieving unmasked data from a mask array? excepting using dt3[~dt3.mask].flatten()? thanks, Chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IP

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

2012-05-23 Thread Nathaniel Smith
On Wed, May 23, 2012 at 2:11 PM, Frédéric Bastien wrote: > +1 > > Don't forget that many user always update to each version. So they > will skip many version. This is especially true for people that rely > on the distribution package that skip many version when they update. > So this is not just a

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

2012-05-23 Thread Frédéric Bastien
+1 Don't forget that many user always update to each version. So they will skip many version. This is especially true for people that rely on the distribution package that skip many version when they update. So this is not just a question of how many version we warn/err, but also how many times we

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

2012-05-23 Thread Olivier Delalleau
2012/5/23 Nathaniel Smith > On Wed, May 23, 2012 at 6:06 AM, Travis Oliphant > wrote: > > I just realized that the pull request doesn't do what I thought it did > which > > is just add the flag to warn users who are writing to an array that is a > > view when it used to be a copy. It's more

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

2012-05-23 Thread Nathaniel Smith
On Wed, May 23, 2012 at 6:06 AM, Travis Oliphant wrote: > I just realized that the pull request doesn't do what I thought it did which > is just add the flag to warn users who are writing to an array that is a > view when it used to be a copy.     It's more cautious and also "copies" the > data fo

[Numpy-discussion] Numpy inverse giving incorrect result

2012-05-23 Thread shbr
I am running the following script as a basic input-output model but the inverse function is bringing back an incorrect result (I have checked this by inputting the data manually).I am very new to python but I assume the error occurs in how the data is gathered from the csv but I don’t know how to