Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Gael Varoquaux
On Mon, Apr 16, 2012 at 10:40:53PM -0500, Travis Oliphant wrote: > > The objectors object to any binary ABI change, but not specifically > > three pointers rather than two or one? > Adding pointers is not really an ABI change (but removing them after > they were there would be...) It's really jus

Re: [Numpy-discussion] f2py with int8

2012-04-16 Thread Sameer Grover
On Tuesday 17 April 2012 11:02 AM, John Mitchell wrote: Hi, I am using f2py to pass a numpy array of type numpy.int8 to fortran. It seems like I am misunderstanding something because I just can't make it work. Here is what I am doing. PYTHON b=numpy.array(numpy.zeros(shape=(10,),dtype=nump

Re: [Numpy-discussion] f2py with int8

2012-04-16 Thread Paul Anton Letnes
Hi, this probably does not help with your problem. However, I would recommend changing your fortran code to: subroutine print_bit_array(bits) use iso_fortran_env integer(kind=int8),intent(in),dimension(:)::bits print*,'bits = ',bits end subroutine print_bit_array In that way you could p

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Travis Oliphant
On Apr 16, 2012, at 11:59 PM, Matthew Brett wrote: > Hi, > > On Mon, Apr 16, 2012 at 8:40 PM, Travis Oliphant wrote: I think the answer to this is yes, but it could be as a feature-filled sub-class (like the current numpy.ma, except in C). >>> >>> I'd love to hear that argumen

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Charles R Harris
On Mon, Apr 16, 2012 at 10:38 PM, Travis Oliphant wrote: > > On Apr 16, 2012, at 11:01 PM, Charles R Harris wrote: > > > > On Mon, Apr 16, 2012 at 8:46 PM, Travis Oliphant wrote: > >> >> On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: >> >> > Hi, >> > >> > On Mon, Apr 16, 2012 at 3:06 PM, Travis

[Numpy-discussion] f2py with int8

2012-04-16 Thread John Mitchell
Hi, I am using f2py to pass a numpy array of type numpy.int8 to fortran. It seems like I am misunderstanding something because I just can't make it work. Here is what I am doing. PYTHON b=numpy.array(numpy.zeros(shape=(10,),dtype=numpy.int8),order='F') b[0]=1 b[2]=1 b[3]=1 b array([1, 0, 1, 1,

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Matthew Brett
Hi, On Mon, Apr 16, 2012 at 8:40 PM, Travis Oliphant wrote: >>> >>> I think the answer to this is yes, but it could be as a feature-filled >>> sub-class (like the current numpy.ma, except in C). >> >> I'd love to hear that argument fleshed out in more detail - do you have time? > > > My proposal

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Travis Oliphant
On Apr 16, 2012, at 11:01 PM, Charles R Harris wrote: > > > On Mon, Apr 16, 2012 at 8:46 PM, Travis Oliphant wrote: > > On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: > > > Hi, > > > > On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant > > wrote: > > > >> I have heard from a few people th

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Charles R Harris
On Mon, Apr 16, 2012 at 8:46 PM, Travis Oliphant wrote: > > On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: > > > Hi, > > > > On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant > wrote: > > > >> I have heard from a few people that they are not excited by the growth > of > >> the NumPy data-struct

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Travis Oliphant
>> >> I think the answer to this is yes, but it could be as a feature-filled >> sub-class (like the current numpy.ma, except in C). > > I'd love to hear that argument fleshed out in more detail - do you have time? My proposal here is to basically take the current github NumPy data-structure a

Re: [Numpy-discussion] adding a cut function to numpy

2012-04-16 Thread Skipper Seabold
On Mon, Apr 16, 2012 at 8:08 PM, Tony Yu wrote: > > > On Mon, Apr 16, 2012 at 6:01 PM, Skipper Seabold > wrote: >> >> On Mon, Apr 16, 2012 at 5:51 PM, Tony Yu wrote: >> > >> > >> > On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold >> > wrote: >> >> >> >> Hi, >> >> >> >> I have a pull request her

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Travis Oliphant
Ralf, I wouldn't change your plans just yet for NumPy 1.7. With Mark available full time for the next few weeks, I think we will be able to make rapid progress on whatever is decided -- in fact if people are available to help but just need resources let me know off list. I just want to ma

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Matthew Brett
Hi, On Mon, Apr 16, 2012 at 7:46 PM, Travis Oliphant wrote: > > On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: > >> Hi, >> >> On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant wrote: >> >>> I have heard from a few people that they are not excited by the growth of >>> the NumPy data-structure b

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Travis Oliphant
On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: > Hi, > > On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant wrote: > >> I have heard from a few people that they are not excited by the growth of >> the NumPy data-structure by the 3 pointers needed to hold the masked-array >> storage. This is

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Matthew Brett
Hi, On Mon, Apr 16, 2012 at 6:03 PM, Matthew Brett wrote: > Hi, > > On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant wrote: > >> I have heard from a few people that they are not excited by the growth of >> the NumPy data-structure by the 3 pointers needed to hold the masked-array >> storage.   T

Re: [Numpy-discussion] Segmentation fault during tests with Python 2.7.2 on Debian 6?

2012-04-16 Thread Charles R Harris
On Mon, Apr 16, 2012 at 5:16 PM, Chris Ball wrote: > Charles R Harris gmail.com> writes: > > > > > > > On Thu, Apr 12, 2012 at 8:13 PM, Charles R Harris > gmail.com> wrote: > > > > On Thu, Apr 12, 2012 at 7:41 PM, Charles R Harris > gmail.com> wrote: > > > > On Thu, Apr 12, 2012 at 2:05 AM, Ch

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Matthew Brett
Hi, On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant wrote: > I have heard from a few people that they are not excited by the growth of > the NumPy data-structure by the 3 pointers needed to hold the masked-array > storage.   This is especially true when there is talk to potentially add > additi

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Charles R Harris
On Mon, Apr 16, 2012 at 5:17 PM, Travis Oliphant wrote: > The comments I have heard have been from people who haven't wanted to make > them on this list. I wish they would, but I understand that not everyone > wants to be drawn into a long discussion.They have not been discussions. > > My bi

Re: [Numpy-discussion] adding a cut function to numpy

2012-04-16 Thread Tony Yu
On Mon, Apr 16, 2012 at 6:01 PM, Skipper Seabold wrote: > On Mon, Apr 16, 2012 at 5:51 PM, Tony Yu wrote: > > > > > > On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold > > wrote: > >> > >> Hi, > >> > >> I have a pull request here [1] to add a cut function similar to R's > >> [2]. It seems there a

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Travis Oliphant
The comments I have heard have been from people who haven't wanted to make them on this list. I wish they would, but I understand that not everyone wants to be drawn into a long discussion.They have not been discussions. My bias is to just move forward with what is there. After a week or

Re: [Numpy-discussion] Segmentation fault during tests with Python 2.7.2 on Debian 6?

2012-04-16 Thread Chris Ball
Charles R Harris gmail.com> writes: > > > On Thu, Apr 12, 2012 at 8:13 PM, Charles R Harris gmail.com> wrote: > > On Thu, Apr 12, 2012 at 7:41 PM, Charles R Harris gmail.com> wrote: > > On Thu, Apr 12, 2012 at 2:05 AM, Chris Ball gmail.com> wrote: > > > > Hi, > I'm trying out various

[Numpy-discussion] Test failures - which dependencies am I missing?

2012-04-16 Thread Chris Ball
Hi, When I build NumPy and then run the tests on Ubuntu (10.04 LTS) and Debian (6.1), I always seem to get several failures. I guess most of these failures come from not having some dependencies installed, but I can't figure out which ones by reading e.g. http://docs.scipy.org/doc/numpy/user/in

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Ralf Gommers
On Tue, Apr 17, 2012 at 12:27 AM, Fernando Perez wrote: > On Mon, Apr 16, 2012 at 3:21 PM, Ralf Gommers > wrote: > > That's the first time I've heard this. Until now, we have talked a lot > about > > adding bitmasks and API changes, not about complete removal. My > assumption > > was that the exp

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Charles R Harris
On Mon, Apr 16, 2012 at 4:33 PM, Travis Oliphant wrote: > No off list discussions have been happening material to this point. I am > basically stating my view for the first time. I have delayed because I > realize it is not a pleasant view and I was hoping I could end up resolving > it favorabl

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Travis Oliphant
No off list discussions have been happening material to this point. I am basically stating my view for the first time. I have delayed because I realize it is not a pleasant view and I was hoping I could end up resolving it favorably. But, it needs to be discussed before 1.7 is released.

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Fernando Perez
On Mon, Apr 16, 2012 at 3:21 PM, Ralf Gommers wrote: > That's the first time I've heard this. Until now, we have talked a lot about > adding bitmasks and API changes, not about complete removal. My assumption > was that the experimental label was enough. From Nathaniel's reaction I > gathered the

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Ralf Gommers
On Tue, Apr 17, 2012 at 12:06 AM, Travis Oliphant wrote: > There is an issue with the NumPy 1.7 release that we all need to > understand. Doesn't including the missing-data attributes in the NumPy > structure in a released version of NumPy basically commit to including > those attributes in NumP

Re: [Numpy-discussion] Different behaviour of python built sum and addition on ndarrays

2012-04-16 Thread Nathaniel Smith
On Mon, Apr 16, 2012 at 11:06 PM, Christopher Mutel wrote: > So, for both 1.5 and 1.6 (at least), it appears that the builtin sum > does not add ndarrays the way "+" (and operator.add) do: > > a = np.arange(10).reshape((2,5)) > b = np.arange(10, 20).reshape((2,5)) > sum(a,b) > Out[5]: > array([[15

[Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-16 Thread Travis Oliphant
There is an issue with the NumPy 1.7 release that we all need to understand. Doesn't including the missing-data attributes in the NumPy structure in a released version of NumPy basically commit to including those attributes in NumPy 1.8? I'm not comfortable with that, is everyone else?

[Numpy-discussion] Different behaviour of python built sum and addition on ndarrays

2012-04-16 Thread Christopher Mutel
So, for both 1.5 and 1.6 (at least), it appears that the builtin sum does not add ndarrays the way "+" (and operator.add) do: a = np.arange(10).reshape((2,5)) b = np.arange(10, 20).reshape((2,5)) sum(a,b) Out[5]: array([[15, 18, 21, 24, 27], [20, 23, 26, 29, 32]]) a + b Out[6]: array([[10,

Re: [Numpy-discussion] adding a cut function to numpy

2012-04-16 Thread Skipper Seabold
On Mon, Apr 16, 2012 at 5:51 PM, Tony Yu wrote: > > > On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold > wrote: >> >> Hi, >> >> I have a pull request here [1] to add a cut function similar to R's >> [2]. It seems there are often requests for similar functionality. It's >> something I'm making use

Re: [Numpy-discussion] 1.7 blockers

2012-04-16 Thread Ralf Gommers
On Mon, Apr 16, 2012 at 11:29 PM, Nathaniel Smith wrote: > On Mon, Apr 16, 2012 at 10:09 PM, Ralf Gommers > wrote: > > > > > > On Sat, Mar 24, 2012 at 10:13 PM, Charles R Harris > > wrote: > >> > >> Hi All, > >> > >> There several problems with numpy master that need to be fixed before a > >> r

Re: [Numpy-discussion] adding a cut function to numpy

2012-04-16 Thread Tony Yu
On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold wrote: > Hi, > > I have a pull request here [1] to add a cut function similar to R's > [2]. It seems there are often requests for similar functionality. It's > something I'm making use of for my own work and would like to use in > statstmodels and i

Re: [Numpy-discussion] 1.7 blockers

2012-04-16 Thread Nathaniel Smith
On Mon, Apr 16, 2012 at 10:09 PM, Ralf Gommers wrote: > > > On Sat, Mar 24, 2012 at 10:13 PM, Charles R Harris > wrote: >> >> Hi All, >> >> There several problems with numpy master that need to be fixed before a >> release can be considered. >> >> Datetime on windows with mingw. > > Opened http:/

[Numpy-discussion] adding a cut function to numpy

2012-04-16 Thread Skipper Seabold
Hi, I have a pull request here [1] to add a cut function similar to R's [2]. It seems there are often requests for similar functionality. It's something I'm making use of for my own work and would like to use in statstmodels and in generating instances of pandas' Factor class, but is this generall

Re: [Numpy-discussion] 1.7 blockers

2012-04-16 Thread Charles R Harris
On Mon, Apr 16, 2012 at 3:09 PM, Ralf Gommers wrote: > > > On Sat, Mar 24, 2012 at 10:13 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> Hi All, >> >> There several problems with numpy master that need to be fixed before a >> release can be considered. >> >>1. Datetime on windo

Re: [Numpy-discussion] 1.7 blockers

2012-04-16 Thread Ralf Gommers
On Sat, Mar 24, 2012 at 10:13 PM, Charles R Harris < charlesr.har...@gmail.com> wrote: > Hi All, > > There several problems with numpy master that need to be fixed before a > release can be considered. > >1. Datetime on windows with mingw. > > Opened http://projects.scipy.org/numpy/ticket/2108

[Numpy-discussion] setting the same object value with a mask?

2012-04-16 Thread Thomas Tanner
Hi, is there an elegant method for assigning the same value to several indices in a ndarray? (in this case with dtype=object) example: a = empty(4,'O') # object ndarray x = [1,2,'f'] # the value to be set for some indicies - the value is not scalar a[array((True,False,True))] = x # works like put

[Numpy-discussion] [f2py] f2py ignores 'fortranname' inside F90 modules?

2012-04-16 Thread Irwin Zaid
Hi all, I've been having an issue with f2py simply ignoring the fortranname option if the Fortran subroutine is inside an F90 module. That option is useful for renaming Fortran subroutines. I don't know if this behaviour is to be expected, or if I am doing something wrong. I would definitely a