[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

[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

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 for the

Re: [Numpy-discussion] 1.7 blockers

2012-04-16 Thread Charles R Harris
On Mon, Apr 16, 2012 at 3:09 PM, Ralf Gommers ralf.gomm...@googlemail.comwrote: 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

[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

Re: [Numpy-discussion] 1.7 blockers

2012-04-16 Thread Nathaniel Smith
On Mon, Apr 16, 2012 at 10:09 PM, Ralf Gommers ralf.gomm...@googlemail.com 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. Datetime on

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 jsseab...@gmail.comwrote: 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

Re: [Numpy-discussion] 1.7 blockers

2012-04-16 Thread Ralf Gommers
On Mon, Apr 16, 2012 at 11:29 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Apr 16, 2012 at 10:09 PM, Ralf Gommers ralf.gomm...@googlemail.com 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

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 tsy...@gmail.com wrote: On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold jsseab...@gmail.com 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

[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,

[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?

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 cmu...@gmail.com 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]:

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

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

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 Charles R Harris
On Mon, Apr 16, 2012 at 4:33 PM, Travis Oliphant tra...@continuum.iowrote: 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

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 fperez@gmail.comwrote: On Mon, Apr 16, 2012 at 3:21 PM, Ralf Gommers ralf.gomm...@googlemail.com 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

[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.

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

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

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

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 jsseab...@gmail.comwrote: On Mon, Apr 16, 2012 at 5:51 PM, Tony Yu tsy...@gmail.com wrote: On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold jsseab...@gmail.com wrote: Hi, I have a pull request here [1] to add a cut function similar

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

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

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 ceb...@gmail.com wrote: Charles R Harris charlesr.harris at gmail.com writes: On Thu, Apr 12, 2012 at 8:13 PM, Charles R Harris charlesr.harris at gmail.com wrote: On Thu, Apr 12, 2012 at 7:41 PM, Charles R Harris charlesr.harris at

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 matthew.br...@gmail.com wrote: Hi, On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant tra...@continuum.io 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

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 tra...@continuum.io wrote: On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: Hi, On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant tra...@continuum.io wrote: I have heard from a few people that they are not excited by the growth of the

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

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 tsy...@gmail.com wrote: On Mon, Apr 16, 2012 at 6:01 PM, Skipper Seabold jsseab...@gmail.com wrote: On Mon, Apr 16, 2012 at 5:51 PM, Tony Yu tsy...@gmail.com wrote: On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold jsseab...@gmail.com wrote:

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 and make

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 tra...@continuum.iowrote: On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: Hi, On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant tra...@continuum.io wrote: I have heard from a few people that they are not excited by the growth of

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 tra...@continuum.io wrote: On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: Hi, On Mon, Apr 16, 2012 at 3:06 PM, Travis Oliphant tra...@continuum.io wrote: I have heard

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

[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 Charles R Harris
On Mon, Apr 16, 2012 at 10:38 PM, Travis Oliphant tra...@continuum.iowrote: On Apr 16, 2012, at 11:01 PM, Charles R Harris wrote: On Mon, Apr 16, 2012 at 8:46 PM, Travis Oliphant tra...@continuum.iowrote: On Apr 16, 2012, at 8:03 PM, Matthew Brett wrote: Hi, On Mon, Apr 16, 2012

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

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

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