[Numpy-discussion] numpy.r_[True, False] is not a boolean array

2010-12-03 Thread oc-spam66
Hello, I observe the following behavior: numpy.r_[True, False] - array([1, 0], dtype=int8) numpy.r_[True] - array([ True], dtype=bool) I would expect the first line to give a boolean array: array([ True, False], dtype=bool) Is it normal? Is it a bug? -- O.C. numpy.__version__ =

Re: [Numpy-discussion] itertools.combinations to numpy

2010-12-03 Thread Warren Weckesser
On Fri, Dec 3, 2010 at 6:31 AM, Mario Moura moura.ma...@gmail.com wrote: Hi Folks I have this situation from timeit import Timer reps = 5 t = Timer('itertools.combinations(range(1,10),3)', 'import itertools') print sum(t.repeat(repeat=reps, number=1)) / reps 1.59740447998e-05 t =

[Numpy-discussion] [PATCH] gfortran under macports

2010-12-03 Thread Fabian Pedregosa
Hi all. Macports installs gfortran as part of the gcc package, but names it gfortran-mp-$version, without providing a symbolic link to a default gcfortran executable, and thus numpy.distutils is unable to find the right executable. The attached patch very simple, it just extends

Re: [Numpy-discussion] numpy.test() Program received signal SIGABRT, Aborted.

2010-12-03 Thread Charles R Harris
On Fri, Dec 3, 2010 at 12:56 AM, Nils Wagner nwag...@iam.uni-stuttgart.dewrote: On Fri, 03 Dec 2010 08:47:32 +0100 Nils Wagner nwag...@iam.uni-stuttgart.de wrote: On Fri, 3 Dec 2010 00:42:16 -0700 Charles R Harris charlesr.har...@gmail.com wrote: On Fri, Dec 3, 2010 at 12:29 AM, Nils

Re: [Numpy-discussion] [PATCH] gfortran under macports

2010-12-03 Thread Charles R Harris
Hi Fabian, On Fri, Dec 3, 2010 at 8:24 AM, Fabian Pedregosa fabian.pedreg...@inria.frwrote: Hi all. Macports installs gfortran as part of the gcc package, but names it gfortran-mp-$version, without providing a symbolic link to a default gcfortran executable, and thus numpy.distutils is

Re: [Numpy-discussion] itertools.combinations to numpy

2010-12-03 Thread Mario Moura
Hi Mr. Weckesser Thanks a lot! Works fine! Regards Mario 2010/12/3 Warren Weckesser warren.weckes...@enthought.com: On Fri, Dec 3, 2010 at 6:31 AM, Mario Moura moura.ma...@gmail.com wrote: Hi Folks I have this situation from timeit import Timer reps = 5 t =

Re: [Numpy-discussion] Float16 and PEP 3118

2010-12-03 Thread Mark Wiebe
On Thu, Dec 2, 2010 at 10:16 AM, Pauli Virtanen p...@iki.fi wrote: Before introducing a PEP 3118 type code for half floats in the PEP, one would need to argue the Python people to add it to the struct module. Before that, the choices probably are: - refuse to export buffers containing half

Re: [Numpy-discussion] Float16 and PEP 3118

2010-12-03 Thread Pauli Virtanen
Fri, 03 Dec 2010 09:23:15 -0800, Mark Wiebe wrote: [clip] - refuse to export buffers containing half floats I think this is the better option, code that needs to do this can create an int16 view for the time being. That's also easier to implement -- no changes are needed :) Pauli