[Numpy-discussion] coding TurkPentland equation

2008-04-02 Thread harryos
i was trying to code the equation 7 of Turk,Pentland paper 'eigenfaces for recognition' The equation says for an image l ,the components in eigen space is wk=uk.T (l-Psi) where uk is a single eigenface vector and Psi is the average image i have an ndarray L that contains data of 1 image per row.

[Numpy-discussion] Compile Numpy in VC++8

2008-04-02 Thread yunzhi cheng
Hi Everybody, I am a new user of Python. I have to re-compile Numpy in VC++8. I download the resource files (numpy-1.0.4.tar.gz) of Numpy at http://sourceforge.net/project/showfiles.php?group_id=1369package_id=175103 I am not good at software. I wonder if anybody give me some

Re: [Numpy-discussion] Compile Numpy in VC++8

2008-04-02 Thread Matthieu Brucher
Hi, You can do this if you have Python compiled with VC++8 as well. If not, you can't. Usually, numpy must be compiled with Visual Studio 7.1 or Mingw. Matthieu 2008/4/2, yunzhi cheng [EMAIL PROTECTED]: Hi Everybody, I am a new user of Python. I have to re-compile Numpy in VC++8. I

[Numpy-discussion] Behavior of __array_wrap__?

2008-04-02 Thread Brian Granger
Hi, I am creating a custom array type (distributed memory arrays - DistArray) and I am using the __array__ and __array_wrap__ methods and __array_priority__ attribute to get these arrays to work with numpy's ufuncs. Things are working fine when I call a ufunc like this: # This works fine (c

Re: [Numpy-discussion] missing function in numpy.ma?

2008-04-02 Thread Charles Doutriaux
Hi Travis, Thanks, I'll fix this and let you know. (probably tomorrow because I came down with some nasty real bug... flue or something like that) C. Travis E. Oliphant wrote: Charles Doutriaux wrote: Hi Travis, Ok we're almost there, in my test suite i get: maresult =

Re: [Numpy-discussion] Numpy installation

2008-04-02 Thread Amit Itagi
Great !! This works for me. Thanks for your help !! Rgds, Amit On Tue, Apr 1, 2008 at 5:36 PM, Robert Kern [EMAIL PROTECTED] wrote: On Tue, Apr 1, 2008 at 4:21 PM, Amit Itagi [EMAIL PROTECTED] wrote: This directory is just the Python source distribution (post configure and make). I don't

Re: [Numpy-discussion] Behavior of __array_wrap__?

2008-04-02 Thread Brian Granger
Travis, Thanks. Here is the text from the numpybook that was confusing me: From section 9.1.2 on ufuncs: The ufuncs can also all take output arguments. The output will be cast if necessary to the provided output array. If a class with an array method is used for the output, results will be

Re: [Numpy-discussion] Applying PIL patch

2008-04-02 Thread Stéfan van der Walt
Hi Izak On Tue, Apr 1, 2008 at 10:08 AM, izak marais [EMAIL PROTECTED] wrote: Stéfan wrote: Unfortunately, RGBA images cannot be read this way. Apparently it does not work with 16bit greyscale tif images either. For anyone else stumbling upon this thread, there is a work-about to get the

Re: [Numpy-discussion] confusion in eigenlib code

2008-04-02 Thread Stéfan van der Walt
Hi Gordon On Tue, Apr 1, 2008 at 5:09 PM, gordon [EMAIL PROTECTED] wrote: hi i came across some code for eigenface construction from some images ,using the old Numeric . http://www.owlnet.rice.edu/~elec301/Projects99/faces/code.html In the eigenlib.py

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Robert Kern
On undefined, Charles R Harris [EMAIL PROTECTED] wrote: Hi All, I think it would enhance broadcasting if functions like sum, mean, etc didn't change the number of dimensions. For example, suppose one wanted to subtract the mean along dimension 2 from the same axis of the original array, then

[Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Charles R Harris
Hi All, I think it would enhance broadcasting if functions like sum, mean, etc didn't change the number of dimensions. For example, suppose one wanted to subtract the mean along dimension 2 from the same axis of the original array, then something like In [44]: a = ones((2,3,4,5)) In [45]: a -=

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Travis E. Oliphant
Charles R Harris wrote: Hi All, I think it would enhance broadcasting if functions like sum, mean, etc didn't change the number of dimensions. For example, suppose one wanted to subtract the mean along dimension 2 from the same axis of the original array, then something like In [44]: a

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Charles R Harris
On Wed, Apr 2, 2008 at 4:30 PM, Robert Kern [EMAIL PROTECTED] wrote: On undefined, Charles R Harris [EMAIL PROTECTED] wrote: Hi All, I think it would enhance broadcasting if functions like sum, mean, etc didn't change the number of dimensions. For example, suppose one wanted to

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Robert Kern
On undefined, Charles R Harris [EMAIL PROTECTED] wrote: On Wed, Apr 2, 2008 at 4:30 PM, Robert Kern [EMAIL PROTECTED] wrote: On undefined, Charles R Harris [EMAIL PROTECTED] wrote: Hi All, I think it would enhance broadcasting if functions like sum, mean, etc didn't change the

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Gary Strangman
If you're looking for user input ... +1 on having a keepdims capability. I have myself implemented many such functions with a keepdims=1 keyword. No real preference on how it's impelemented, though the potential for breakage is a concern ... Gary On Wed, 2 Apr 2008, Charles R Harris wrote:

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Charles R Harris
On Wed, Apr 2, 2008 at 4:40 PM, Travis E. Oliphant [EMAIL PROTECTED] wrote: Charles R Harris wrote: Hi All, I think it would enhance broadcasting if functions like sum, mean, etc didn't change the number of dimensions. For example, suppose one wanted to subtract the mean along

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Timothy Hochberg
[SNIP] The text is getting kind of broken up so I'm chopping it and starting from scratch. To the question of whether it's a good idea to change the default behavior of mean and friends to not reduce over the chosen axis, I have to agree with Robert: too much code breakage for to little gain, so

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Robert Kern
On undefined, Timothy Hochberg [EMAIL PROTECTED] wrote: As to what to name it, if it did come to pass. I'm not happy 'keepshape' since we'd not actually be keeping the shape, just the number of dimensions. 'keepdims' is better, but still seem awkard. I'd prefer something like 'reduce', so the

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Joe Harrington
I think it would enhance broadcasting if functions like sum, mean, etc didn't change the number of dimensions. I strongly favor doing it, but with keepshape (or just keep, to make it short) and not by default. It's at least as common to take a mean down an axis of a 2D array and plot it

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Eric Firing
Robert Kern wrote: On undefined, Timothy Hochberg [EMAIL PROTECTED] wrote: As to what to name it, if it did come to pass. I'm not happy 'keepshape' since we'd not actually be keeping the shape, just the number of dimensions. 'keepdims' is better, but still seem awkard. I'd prefer something

Re: [Numpy-discussion] Compile Numpy in VC++8

2008-04-02 Thread yunzhi cheng
Hi Matthieu, I have to call a commercial software APIs from Python. If I import Numpy and that software package in one script, they are not compatible. Sometimes error occurs. But either one of them works well in Python. Just they cannot exist together. The supporters of the commercial

[Numpy-discussion] Final push for NumPy 1.0.5 (I need your help!)

2008-04-02 Thread Jarrod Millman
Hello, I know that I am beginning to sound like a broken record, but I think we are finally ready to roll out NumPy 1.0.5. Since my last email about 60 bug tickets have been closed. As of tonight I believe that there is no know regressions to justify further delaying this release. Unless

Re: [Numpy-discussion] Compile Numpy in VC++8

2008-04-02 Thread Matthieu Brucher
Hi, As I've said, you must start by compiling Python with VC++ 8, that means using the 2.6 alpha. Matthieu 2008/4/3, yunzhi cheng [EMAIL PROTECTED]: Hi Matthieu, I have to call a commercial software APIs from Python. If I import Numpy and that software package in one script, they are not