[Numpy-discussion] return index of maximum value in an array easily?

2013-01-10 Thread Chao YUE
Dear all, Are we going to consider returning the index of maximum value in an array easily without calling np.argmax and np.unravel_index consecutively? I saw few posts in mailing archive and stackover flow on this, when I tried to return the index of maximum value of 2d array. It seems that I

Re: [Numpy-discussion] return index of maximum value in an array easily?

2013-01-10 Thread Hanno Klemm
Hi Chao, in two dimensions the following works very well: In [97]: a = np.random.randn(5,7) In [98]: a[divmod(a.argmax(), a.shape[1])] Out[98]: 1.3680204597100922 In [99]: a.max() Out[99]: 1.3680204597100922 In [100]: In [100]: b = a[divmod(a.argmax(), a.shape[1])] In [101]: b==a.max()

[Numpy-discussion] int and long issues

2013-01-10 Thread Mads Ipsen
Hi, I find this to be a little strange: x = numpy.arange(10) isinstance(x[0],int) gives True y = numpy.where(x 5)[0] isinstance(y[0],int) gives False isinstance(y[0],long) gives True Specs: Python 2.7.2, numpy-1.6.1, Win7, 64 bit Best regards, Mads --

Re: [Numpy-discussion] ANN: first previews of WinPython for Python 3 32/64bit

2013-01-10 Thread Till Stensitzki
Pierre Raybaut pierre.raybaut at gmail.com writes: Hi all, I'm pleased to announce that the first previews of WinPython for Python 3 32bit and 64bit are available (WinPython v3.3.0.0alpha1): http://code.google.com/p/winpython/ This first release based on Python 3 required to migrate the

Re: [Numpy-discussion] int and long issues

2013-01-10 Thread Sebastian Berg
On Thu, 2013-01-10 at 11:32 +0100, Mads Ipsen wrote: Hi, I find this to be a little strange: x = numpy.arange(10) isinstance(x[0],int) gives True y = numpy.where(x 5)[0] isinstance(y[0],int) gives False isinstance(y[0],long) Check what

Re: [Numpy-discussion] int and long issues

2013-01-10 Thread Sebastian Berg
On Thu, 2013-01-10 at 11:32 +0100, Mads Ipsen wrote: Hi, I find this to be a little strange: x = numpy.arange(10) isinstance(x[0],int) gives True y = numpy.where(x 5)[0] isinstance(y[0],int) gives False isinstance(y[0],long) Check what

Re: [Numpy-discussion] Linear least squares

2013-01-10 Thread Till Stensitzki
QR without column pivoting is a nice option for safe problems, but it doesn't provide a reliable indication of rank reduction. I also don't find pinv useful once the rank goes down, since it relies on Euclidean distance having relevance in parameter space and that is seldom a sound

Re: [Numpy-discussion] int and long issues

2013-01-10 Thread Mads Ipsen
Sebastian - thanks - very helpful. Best regards, Mads On 10/01/2013 12:06, Sebastian Berg wrote: On Thu, 2013-01-10 at 11:32 +0100, Mads Ipsen wrote: Hi, I find this to be a little strange: x = numpy.arange(10) isinstance(x[0],int) gives True y = numpy.where(x 5)[0]

Re: [Numpy-discussion] numpydoc for python 3?

2013-01-10 Thread Pauli Virtanen
Hi, Jaakko Luttinen jaakko.luttinen at aalto.fi writes: I'm trying to use numpydoc (Sphinx extension) for my project written in Python 3.2. However, installing numpydoc gives errors shown at http://pastebin.com/MPED6v9G and although it says Successfully installed numpydoc, trying to import

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-10 Thread Frédéric Bastien
Hi, Just to note, as they plan to remove there dependency on it this year, is it bad that they can't use 1.8 for a few mounts until they finish the conversion? They already have a working version. They can continue to use it for as long they want. The only advantage for them if the compat layers

Re: [Numpy-discussion] numpydoc for python 3?

2013-01-10 Thread Jaakko Luttinen
The files in numpy/doc/sphinxext/ and numpydoc/ (from PyPI) are a bit different. Which ones should be modified? -Jaakko On 01/10/2013 02:04 PM, Pauli Virtanen wrote: Hi, Jaakko Luttinen jaakko.luttinen at aalto.fi writes: I'm trying to use numpydoc (Sphinx extension) for my project written

Re: [Numpy-discussion] numpydoc for python 3?

2013-01-10 Thread Pauli Virtanen
Jaakko Luttinen jaakko.luttinen at aalto.fi writes: The files in numpy/doc/sphinxext/ and numpydoc/ (from PyPI) are a bit different. Which ones should be modified? The stuff in sphinxext/ is the development version of the package on PyPi, so the changes should be made in sphinxext/ -- Pauli

Re: [Numpy-discussion] numpydoc for python 3?

2013-01-10 Thread Jaakko Luttinen
On 01/10/2013 05:04 PM, Pauli Virtanen wrote: Jaakko Luttinen jaakko.luttinen at aalto.fi writes: The files in numpy/doc/sphinxext/ and numpydoc/ (from PyPI) are a bit different. Which ones should be modified? The stuff in sphinxext/ is the development version of the package on PyPi, so the

[Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

2013-01-10 Thread klo
Hi, I run `python3 setup.py config` and then python3 setup.py build --compiler=mingw32 but it picks that I have MSVC 10 and complains about manifests. Why, or even better, how to compile with available MinGW compilers? Here is log:

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-10 Thread Christopher Hanley
I'm all for a big scary warning on import. Fair warning is good for everyone, not just our developers. As for testing, our software that uses the API is tested nightly. So if our software stops working, and the compatibility layer is the cause, we would definitely be looking into what happened.

Re: [Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

2013-01-10 Thread Peter Cock
On Thu, Jan 10, 2013 at 3:56 PM, klo klo...@gmail.com wrote: Hi, I run `python3 setup.py config` and then python3 setup.py build --compiler=mingw32 but it picks that I have MSVC 10 and complains about manifests. Why, or even better, how to compile with available MinGW compilers? I

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-10 Thread Raul Cota
based on our situation On 10/01/2013 9:02 AM, Christopher Hanley wrote: I'm all for a big scary warning on import. Fair warning is good for everyone, not just our developers. agree As

Re: [Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

2013-01-10 Thread klo
I reported this issue/bug to the mailing list recently as part of a discussion with Ralf which lead to various fixes being made to get NumPy to compile with either mingw32 or MSCV 10. http://mail.scipy.org/pipermail/numpy-discussion/2012-November/064454.html My workaround is to change the

Re: [Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

2013-01-10 Thread Christoph Gohlke
On 1/10/2013 8:35 AM, klo wrote: I reported this issue/bug to the mailing list recently as part of a discussion with Ralf which lead to various fixes being made to get NumPy to compile with either mingw32 or MSCV 10. http://mail.scipy.org/pipermail/numpy-discussion/2012-November/064454.html

Re: [Numpy-discussion] Which Python to use for Mac binaries

2013-01-10 Thread Chris Barker - NOAA Federal
Ondřej, Vincent, and Ralf (and others..) Thank you so much for doing all this -- it's a great service to the MacPython community. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206)

Re: [Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

2013-01-10 Thread klo
Numpy = 1.6 is not compatible with Python 3.3. Use numpy = 1.7.0rc1. Thanks for the tip 1.7.0rc builds without issue ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

2013-01-10 Thread klo
Numpy = 1.6 is not compatible with Python 3.3. Use numpy = 1.7.0rc1. Thanks for the tip 1.7.0rc builds without issue Actually, this isn't over. It builds fine, but when I try to import numpy I get error: ... from numpy.linalg import lapack_lite

Re: [Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

2013-01-10 Thread klo
Actually, this isn't over. It builds fine, but when I try to import numpy I get error: ... Sorry for the noise, after re-reading tracelog, I realized that I accidentally removed c:\python33\libs\libpython33.a while removing previous non-working numpy

Re: [Numpy-discussion] Which Python to use for Mac binaries

2013-01-10 Thread Ondřej Čertík
On Wed, Jan 9, 2013 at 11:21 PM, Ralf Gommers ralf.gomm...@gmail.com wrote: Sure, no problem. For the part that needs to be built on 10.6 that is. Vincent's box still has 10.5, right? Yes. Ondrej ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Which Python to use for Mac binaries

2013-01-10 Thread Ondřej Čertík
On Thu, Jan 10, 2013 at 9:26 AM, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: Ondřej, Vincent, and Ralf (and others..) Thank you so much for doing all this -- it's a great service to the MacPython community. Chris, thank you for your help as well! Ondrej

Re: [Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

2013-01-10 Thread Ondřej Čertík
On Thu, Jan 10, 2013 at 12:20 PM, klo klo...@gmail.com wrote: Actually, this isn't over. It builds fine, but when I try to import numpy I get error: ... Sorry for the noise, after re-reading tracelog, I realized that I accidentally removed