Re: [Numpy-discussion] Numpy 1.4.0 rc1 released

2009-12-02 Thread Nadav Horesh
I got the following errors with a clean installation of numpy (previous installations deleted): Running unit tests for numpy NumPy version 1.4.0rc1 NumPy is installed in /usr/lib64/python2.6/site-packages/numpy Python version 2.6.4 (r264:75706, Nov 5 2009, 20:27:15) [GCC 4.3.4] nose version

[Numpy-discussion] Import numpy fails on cygwin python

2009-12-02 Thread Olivia Cheronet
Hello! I have built numpy (updated to the trunk) for my cygwin (1.5.25) Python (2.5.2). However, testing fails when I try to import numpy in python (see output below). I have been searching around for a solution, but everything has failed so far... I would be grateful for any advice. Thank

Re: [Numpy-discussion] Numpy 1.4.0 rc1 released

2009-12-02 Thread David Cournapeau
Nadav Horesh wrote: I got the following errors with a clean installation of numpy (previous installations deleted): Actually, there are still some leftover: the file numpy/core/test_defmatrix.py does not exist in the tarball. cheers, David ___

Re: [Numpy-discussion] Import numpy fails on cygwin python

2009-12-02 Thread David Cournapeau
Olivia Cheronet wrote: Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.5/site-packages/numpy/__init__.py, line 132, in modul e import add_newdocs File /usr/lib/python2.5/site-packages/numpy/add_newdocs.py, line 9, in modu le from lib

Re: [Numpy-discussion] numpy 1.3.0 eggs with python2.6 seem broken on osx, and linux

2009-12-02 Thread René Dudfield
On Sat, Nov 28, 2009 at 2:56 PM, David Cournapeau courn...@gmail.comwrote: On Sat, Nov 28, 2009 at 10:42 PM, René Dudfield ren...@gmail.com wrote: yeah, I completely understand the unfortunate packaging situation (eg, some of my packages do not work with this install method). Here is

Re: [Numpy-discussion] Numpy 1.4.0 rc1 released

2009-12-02 Thread René Dudfield
On Wed, Dec 2, 2009 at 9:49 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Nadav Horesh wrote: I got the following errors with a clean installation of numpy (previous installations deleted): Actually, there are still some leftover: the file numpy/core/test_defmatrix.py does not

Re: [Numpy-discussion] Numpy 1.4.0 rc1 released

2009-12-02 Thread David Cournapeau
René Dudfield wrote: We put in some hacks into pygame distutils for removing old files (with msi installer, and for setup.py installer). However I think the long term solution they are thinking of is to allow distutils to uninstall correctly. I think this is just wishful thinking from people

Re: [Numpy-discussion] Numpy 1.4.0 rc1 released

2009-12-02 Thread René Dudfield
On Wed, Dec 2, 2009 at 11:51 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: René Dudfield wrote: We put in some hacks into pygame distutils for removing old files (with msi installer, and for setup.py installer).  However I think the long term solution they are thinking of is to

Re: [Numpy-discussion] Numpy 1.4.0 rc1 released

2009-12-02 Thread Bruce Southey
On 12/02/2009 02:49 AM, David Cournapeau wrote: Nadav Horesh wrote: I got the following errors with a clean installation of numpy (previous installations deleted): Actually, there are still some leftover: the file numpy/core/test_defmatrix.py does not exist in the tarball.

[Numpy-discussion] ANN: qimage2ndarray - converting between QImages and numpy.ndarrays

2009-12-02 Thread Hans Meine
Hi, I have just uploaded a first release of qimage2ndarray, a tiny python extension for quickly converting between QImages and numpy.ndarrays (in both directions). These are very common tasks when programming e.g. scientific visualizations in Python using PyQt4 as the GUI library. Similar

Re: [Numpy-discussion] ANN: qimage2ndarray - converting between QImages and numpy.ndarrays

2009-12-02 Thread Robert Kern
2009/12/2 Hans Meine me...@informatik.uni-hamburg.de: PS: Now that I am announcing this, I suddenly have the feeling that I should have talked with some lawyer (or Phil) about possible license issues because of PyQt.  I really hope there will not turn out to be problems with this. The PyQt

Re: [Numpy-discussion] a simple examplr showing numpy and matplotlib failing

2009-12-02 Thread Yeates, Mathew C (388D)
Anybody have any ideas what is going on here. Although I found a workaround, I'm concerned about memory leaks From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Yeates, Mathew C (388D) Sent: Tuesday, December 01,

Re: [Numpy-discussion] Numpy 1.4.0 rc1 released

2009-12-02 Thread Charles R Harris
On Wed, Dec 2, 2009 at 1:28 PM, Christopher Barker chris.bar...@noaa.govwrote: I downloaded rc1, and built it on my PPC OS-X 10.4 box, with Python 2.5.2 (from python.org). Then ran the tests. I got: -- Ran 2521 tests in

Re: [Numpy-discussion] a simple examplr showing numpy and matplotlib failing

2009-12-02 Thread Joe Kington
I'm just guessing here, but have you tried completely destroying the figure each time, as Michael suggested? That should avoid the problem you're having, I think... At any rate, if you don't do a fig.clf(), I'm fairly sure matplotlib keeps a reference to the data around. Hope that helps, -Joe

Re: [Numpy-discussion] Import numpy fails on cygwin python

2009-12-02 Thread Olivia Cheronet
- Original Message From: David Cournapeau da...@ar.media.kyoto-u.ac.jp Does the file /usr/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so exist ? cheers, David Indeed, this file is not there. Where can I find it? Thanks. Olivia

Re: [Numpy-discussion] ANN: qimage2ndarray - converting between QImages and numpy.ndarrays

2009-12-02 Thread Chris Colbert
Cool. Thanks! I will take a look at this. We have some code in scikits.image that creates a QImage from the numpy data buffer for display. But I have only implemented it for RGB888 so far. So you may have saved me some time :) Cheers! Chris 2009/12/2 Hans Meine me...@informatik.uni-hamburg.de:

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Pierre GM
On Dec 2, 2009, at 6:55 PM, Howard Chong wrote: My question is: how can I make the latter version run faster? I think the answer is that I have to do the iteration in C. If that's the case, can anyone point me to where np.array.argmax() is implemented so I can write np.array.argmaxN()

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread David Warde-Farley
On 2-Dec-09, at 6:55 PM, Howard Chong wrote: def myFindMaxA(myList): implement finding maximum value with for loop iteration maxIndex=0 maxVal=myList[0] for index, item in enumerate(myList): if item[0]maxVal: maxVal=item[0] maxIndex=index

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Keith Goodman
On Wed, Dec 2, 2009 at 5:09 PM, Neal Becker ndbeck...@gmail.com wrote: David Warde-Farley wrote: On 2-Dec-09, at 6:55 PM, Howard Chong wrote: def myFindMaxA(myList):    implement finding maximum value with for loop iteration    maxIndex=0    maxVal=myList[0]    for index, item in

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread David Warde-Farley
On 2-Dec-09, at 8:09 PM, Neal Becker wrote: Not bad, although I wonder whether a partial sort could be faster. Probably (if the array is large) but depending on n, not if it's in Python. Ideal problem for Cython, though. David ___ NumPy-Discussion

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Anne Archibald
2009/12/2 Keith Goodman kwgood...@gmail.com: On Wed, Dec 2, 2009 at 5:09 PM, Neal Becker ndbeck...@gmail.com wrote: David Warde-Farley wrote: On 2-Dec-09, at 6:55 PM, Howard Chong wrote: def myFindMaxA(myList):    implement finding maximum value with for loop iteration    maxIndex=0    

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Neal Becker
Keith Goodman wrote: ... Not bad, although I wonder whether a partial sort could be faster. I'm doing a lot of sorting right now. I only need to sort the lowest 30% of values in a 1d array (about 250k elements), the rest I don't need to sort. How do I do a partial sort? I only know of it

[Numpy-discussion] SPARC Buildbot bus errors after recent commits

2009-12-02 Thread Charles R Harris
Hi Travis, I think this is yours ;) ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Anne Archibald
2009/12/2 David Warde-Farley d...@cs.toronto.edu: On 2-Dec-09, at 8:09 PM, Neal Becker wrote: Not bad, although I wonder whether a partial sort could be faster. Probably (if the array is large) but depending on n, not if it's in Python. Ideal problem for Cython, though. How is Cython

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Keith Goodman
On Wed, Dec 2, 2009 at 5:27 PM, Anne Archibald peridot.face...@gmail.com wrote: 2009/12/2 Keith Goodman kwgood...@gmail.com: On Wed, Dec 2, 2009 at 5:09 PM, Neal Becker ndbeck...@gmail.com wrote: David Warde-Farley wrote: On 2-Dec-09, at 6:55 PM, Howard Chong wrote: def myFindMaxA(myList):

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Anne Archibald
2009/12/2 Keith Goodman kwgood...@gmail.com: On Wed, Dec 2, 2009 at 5:27 PM, Anne Archibald peridot.face...@gmail.com wrote: 2009/12/2 Keith Goodman kwgood...@gmail.com: On Wed, Dec 2, 2009 at 5:09 PM, Neal Becker ndbeck...@gmail.com wrote: David Warde-Farley wrote: On 2-Dec-09, at 6:55 PM,

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Keith Goodman
On Wed, Dec 2, 2009 at 5:52 PM, Anne Archibald peridot.face...@gmail.com wrote: 2009/12/2 Keith Goodman kwgood...@gmail.com: On Wed, Dec 2, 2009 at 5:27 PM, Anne Archibald peridot.face...@gmail.com wrote: 2009/12/2 Keith Goodman kwgood...@gmail.com: On Wed, Dec 2, 2009 at 5:09 PM, Neal Becker

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread David Warde-Farley
On 2-Dec-09, at 8:32 PM, Anne Archibald wrote: 2009/12/2 David Warde-Farley d...@cs.toronto.edu: On 2-Dec-09, at 8:09 PM, Neal Becker wrote: Not bad, although I wonder whether a partial sort could be faster. Probably (if the array is large) but depending on n, not if it's in Python. Ideal

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Keith Goodman
On Wed, Dec 2, 2009 at 5:44 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Dec 2, 2009 at 6:32 PM, Anne Archibald peridot.face...@gmail.com wrote: 2009/12/2 David Warde-Farley d...@cs.toronto.edu: On 2-Dec-09, at 8:09 PM, Neal Becker wrote: Not bad, although I wonder

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Neal Becker
Keith Goodman wrote: ... Oh, I thought he meant there was a numpy function for partial sorting. Actually, I do use this myself. My code is a boost::python wrapper or the std::partial_sum using pyublas. Here's the main pieces: templatetypename out_t, typename in_t inline out_t partial_sum

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Neal Becker
Neal Becker wrote: Keith Goodman wrote: ... Oh, I thought he meant there was a numpy function for partial sorting. Actually, I do use this myself. My code is a boost::python wrapper or the std::partial_sum using pyublas. Here's the main pieces: templatetypename out_t, typename in_t

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Keith Goodman
On Wed, Dec 2, 2009 at 7:15 PM, Neal Becker ndbeck...@gmail.com wrote: Neal Becker wrote: Keith Goodman wrote: ... Oh, I thought he meant there was a numpy function for partial sorting. Actually, I do use this myself.  My code is a boost::python wrapper or the std::partial_sum using

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Neal Becker
Neal Becker wrote: Keith Goodman wrote: ... Oh, I thought he meant there was a numpy function for partial sorting. Try this one: templatetypename in_t inline void partial_sort (in_t in, int n_el) { std::partial_sort (boost::begin (in), boost::begin(in) + n_el, boost::end (in)); } ...

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Neal Becker
Keith Goodman wrote: On Wed, Dec 2, 2009 at 7:15 PM, Neal Becker ndbeck...@gmail.com wrote: Neal Becker wrote: Keith Goodman wrote: ... Oh, I thought he meant there was a numpy function for partial sorting. Actually, I do use this myself. My code is a boost::python wrapper or the

Re: [Numpy-discussion] Find the N maximum values and corresponding indexes in an array

2009-12-02 Thread Keith Goodman
On Wed, Dec 2, 2009 at 7:31 PM, Neal Becker ndbeck...@gmail.com wrote: Keith Goodman wrote: On Wed, Dec 2, 2009 at 7:15 PM, Neal Becker ndbeck...@gmail.com wrote: Neal Becker wrote: Keith Goodman wrote: ... Oh, I thought he meant there was a numpy function for partial sorting.

Re: [Numpy-discussion] non-standard standard deviation

2009-12-02 Thread yogesh karpate
The thing is that the normalization by (n-1) is done for the no. of samples 20 or23(Not sure about this no. but sure about the thing that this no isnt greater than 25) and below that we use normalization by n. Regards ~ymk ___ NumPy-Discussion mailing

[Numpy-discussion] How to solve homogeneous linear equations with NumPy?

2009-12-02 Thread Peter Cai
How to solve homogeneous linear equations with NumPy? If I have homogeneous linear equations like this array([[-0.75, 0.25, 0.25, 0.25], [ 1. , -1. , 0. , 0. ], [ 1. , 0. , -1. , 0. ], [ 1. , 0. , 0. , -1. ]]) And I want to get a non-zero solution for

Re: [Numpy-discussion] How to solve homogeneous linear equations with NumPy?

2009-12-02 Thread Charles R Harris
On Wed, Dec 2, 2009 at 10:40 PM, Peter Cai newpt...@gmail.com wrote: How to solve homogeneous linear equations with NumPy? If I have homogeneous linear equations like this array([[-0.75, 0.25, 0.25, 0.25], [ 1. , -1. , 0. , 0. ], [ 1. , 0. , -1. , 0. ],

Re: [Numpy-discussion] How to solve homogeneous linear equations with NumPy?

2009-12-02 Thread Peter Cai
Thanks a lot. But my knowledge of linear equations are limited, so can explain in your code, which result represent the solution set of solution? BTW : since [1, 1, 1, 1] is an obviously non-trivial solution, can you prove your method could verify it? On Thu, Dec 3, 2009 at 2:04 PM, Charles R