Re: [Numpy-discussion] NumPy-Discussion Digest, Vol 84, Issue 19

2013-09-09 Thread Graeme B. Bell
Hi again Julian, its not np.any that is slow in this case its np.array([A, B, C]) Not really. The 4 unique alternative implementations provided all work quickly and correctly as-is, without a need to jump through a strange idiomatic hoop, so the problem does indeed lie with the

Re: [Numpy-discussion] NumPy-Discussion Digest, Vol 84, Issue 18

2013-09-09 Thread Graeme B. Bell
This is good stuff, but I can't help thinking that if I needed to do an any/all test on a number of arrays with common and/or combos -- I'd probably write a Cython function to do it. Hi Chris, I agree, if you want the best performance and have no constraints on implementation, then using

Re: [Numpy-discussion] Funny business with 'is' operator?

2013-09-09 Thread Robert Kern
On Fri, Sep 6, 2013 at 6:50 PM, James Bergstra bergs...@iro.umontreal.ca wrote: Thanks, this is exactly what I was looking for. I'll look into what this Diophantine equation is. Let's say we have two arrays with shape tuples `shape0` and `shape1`, stride tuples `stride0` and `stride1` and

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Neal Becker
Charles R Harris wrote: Hi all, I'm happy to announce the second beta release of Numpy 1.8.0. This release should solve the Windows problems encountered in the first beta. Many thanks to Christolph Gohlke and Julian Taylor for their hard work in getting those issues settled. It would be

[Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread Chad Kidder
I'm trying to enter a 2-D array and np.array() is returning a 1-D array of lists. I'm using Python (x,y) on Windows 7 with numpy 1.7.1. Here's the code that is giving me issues. f1 = [[15.207, 15.266, 15.181, 15.189, 15.215, 15.198], [-45, -57, -62, -70, -72, -73.5, -77]] f1a = np.array(f1)

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Frédéric Bastien
Hi, I checkout the dev version of numpy and it fail to compile with this error: creating build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/numpy/core/src/multiarray compile options: '-DHAVE_NPY_CONFIG_H=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy

Re: [Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread Benjamin Root
The two lists are of different sizes. Had to count twice to catch that. Ben Root On Mon, Sep 9, 2013 at 9:46 AM, Chad Kidder cckid...@gmail.com wrote: I'm trying to enter a 2-D array and np.array() is returning a 1-D array of lists. I'm using Python (x,y) on Windows 7 with numpy 1.7.1.

Re: [Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread Nathaniel Smith
One list has 6 entries and one has 7, so they can't be aligned into a single array. Possibly it would be better to raise an error here instead of returning an object array, but that's what's going on. -n On 9 Sep 2013 14:49, Chad Kidder cckid...@gmail.com wrote: I'm trying to enter a 2-D array

Re: [Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread Chad Kidder
Oh, so there was a bug in the user... On Mon, Sep 9, 2013 at 7:52 AM, Nathaniel Smith n...@pobox.com wrote: One list has 6 entries and one has 7, so they can't be aligned into a single array. Possibly it would be better to raise an error here instead of returning an object array, but that's

Re: [Numpy-discussion] PEP8

2013-09-09 Thread Benjamin Root
On Sat, Sep 7, 2013 at 7:56 PM, Charles R Harris charlesr.har...@gmail.comwrote: Hi All, I've been doing some PEP8 work using autopep8. One problem that has turned up is that the default behavior of autopep8 is version dependent. I'd like to put a script in numpy tools that runs autopep8

Re: [Numpy-discussion] PEP8

2013-09-09 Thread Richard Hattersley
Something we have done in matplotlib is that we have made PEP8 a part of the tests. In Iris and Cartopy we've also done this and it works well. While we transition we have an exclusion list (which is gradually getting shorter). We've had mixed experiences with automatic reformatting, so prefer

Re: [Numpy-discussion] PEP8

2013-09-09 Thread Charles R Harris
On Mon, Sep 9, 2013 at 8:12 AM, Richard Hattersley rhatters...@gmail.comwrote: Something we have done in matplotlib is that we have made PEP8 a part of the tests. In Iris and Cartopy we've also done this and it works well. While we transition we have an exclusion list (which is gradually

Re: [Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread josef . pktd
On Mon, Sep 9, 2013 at 9:52 AM, Nathaniel Smith n...@pobox.com wrote: One list has 6 entries and one has 7, so they can't be aligned into a single array. Possibly it would be better to raise an error here instead of returning an object array, but that's what's going on. It did at some point

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Charles R Harris
On Mon, Sep 9, 2013 at 7:46 AM, Frédéric Bastien no...@nouiz.org wrote: Hi, I checkout the dev version of numpy and it fail to compile with this error: creating build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/numpy/core/src/multiarray compile options: '-DHAVE_NPY_CONFIG_H=1

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Charles R Harris
On Mon, Sep 9, 2013 at 8:51 AM, Charles R Harris charlesr.har...@gmail.comwrote: On Mon, Sep 9, 2013 at 7:46 AM, Frédéric Bastien no...@nouiz.org wrote: Hi, I checkout the dev version of numpy and it fail to compile with this error: creating

Re: [Numpy-discussion] PEP8

2013-09-09 Thread Blake Griffith
I think a good solution would to use add a git_hooks directory with a pre-commit git hook along with an git hook installation script. And a note should be added to DEV_README.txt suggesting installing the git hooks for pep8 compatibility. I personally use this as a pre-commit #!/bin/sh

Re: [Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread josef . pktd
On Mon, Sep 9, 2013 at 11:35 AM, Nathaniel Smith n...@pobox.com wrote: On 9 Sep 2013 15:50, josef.p...@gmail.com wrote: On Mon, Sep 9, 2013 at 9:52 AM, Nathaniel Smith n...@pobox.com wrote: One list has 6 entries and one has 7, so they can't be aligned into a single array. Possibly it

Re: [Numpy-discussion] PEP8

2013-09-09 Thread Nathaniel Smith
On Mon, Sep 9, 2013 at 3:29 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Sep 9, 2013 at 8:12 AM, Richard Hattersley rhatters...@gmail.com wrote: Something we have done in matplotlib is that we have made PEP8 a part of the tests. In Iris and Cartopy we've also done this

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Charles R Harris
On Mon, Sep 9, 2013 at 9:33 AM, Frédéric Bastien no...@nouiz.org wrote: I tried it and retried and it still fail. This is in an virtualenv $git show commit c9b06111227f7a4ec213571f97e1b8d19b9c23f5 Merge: 73fbfb2 8edccea Author: Charles Harris charlesr.har...@gmail.com Date: Sun Sep 8

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Frédéric Bastien
I don't have CFLAGS defined. But I have iothers env variable that point to other python stuff like CPATH. But even in that case, I don't understand how other people could have compiled methods.c. The include aren't part of the env variable, but in the file. Anyway, I think your PR is the good

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Charles R Harris
On Mon, Sep 9, 2013 at 11:09 AM, Frédéric Bastien no...@nouiz.org wrote: I don't have CFLAGS defined. But I have iothers env variable that point to other python stuff like CPATH. But even in that case, I don't understand how other people could have compiled methods.c. The include aren't part

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Nathaniel Smith
On Mon, Sep 9, 2013 at 6:09 PM, Frédéric Bastien no...@nouiz.org wrote: I don't have CFLAGS defined. But I have iothers env variable that point to other python stuff like CPATH. But even in that case, I don't understand how other people could have compiled methods.c. The include aren't part

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Charles R Harris
On Mon, Sep 9, 2013 at 12:04 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Sep 9, 2013 at 11:09 AM, Frédéric Bastien no...@nouiz.org wrote: I don't have CFLAGS defined. But I have iothers env variable that point to other python stuff like CPATH. But even in that case, I

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Julian Taylor
try rebuilding everything from scratch. setup.py dependency handling is a bit dodgy with the generated files. On 09.09.2013 19:09, Frédéric Bastien wrote: I don't have CFLAGS defined. But I have iothers env variable that point to other python stuff like CPATH. But even in that case, I don't

Re: [Numpy-discussion] ANN: 1.8.0b2 release.

2013-09-09 Thread Frédéric Bastien
I tried it and retried and it still fail. This is in an virtualenv $git show commit c9b06111227f7a4ec213571f97e1b8d19b9c23f5 Merge: 73fbfb2 8edccea Author: Charles Harris charlesr.har...@gmail.com Date: Sun Sep 8 19:47:21 2013 -0700 Merge pull request #3701 from cgohlke/patch-2 ENH:

Re: [Numpy-discussion] PEP8

2013-09-09 Thread Cera, Tim
I made a PR request about supplying a git hooks framework at https://github.com/numpy/numpy/pull/200. I asked for it to be closed because I couldn't easily figure our how to handle x-platform issues. If you have an answer, what I was working on might be a start. But your script is an example of

Re: [Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread Nathaniel Smith
On 9 Sep 2013 15:50, josef.p...@gmail.com wrote: On Mon, Sep 9, 2013 at 9:52 AM, Nathaniel Smith n...@pobox.com wrote: One list has 6 entries and one has 7, so they can't be aligned into a single array. Possibly it would be better to raise an error here instead of returning an object