Re: [Numpy-discussion] Scipy page

2008-01-21 Thread Hans Meine
Am Sonntag, 20. Januar 2008 23:15:24 schrieb Travis Vaught: On Jan 20, 2008, at 3:30 PM, Charles R Harris wrote: Thanks for the attention to this...I think we need to seek continual improvement to the web site (numpy's default pages, again, could use some TLC). I've tweaked the bug a bit

Re: [Numpy-discussion] creating rec arrays

2008-01-21 Thread Francesc Altet
A Sunday 20 January 2008, Nicholas escrigué: I am trying to package a set of vector arrays into a single rec array with column titles. c = numpy.rec.fromarrays([a,b],names='a,b') the problem is there is no 'copy' argument in .fromarrays which I can set to False. i.e. is there a way to do

Re: [Numpy-discussion] numpy.distutils does not output compilation warning on win32 ?

2008-01-21 Thread Pearu Peterson
Hi, If I remember correctly then the warnings were disabled because when compiling numpy/scipy on windows there were *lots* of warnings, especially for pyrex generated sources. When there is an error, all warnings will be shown. Hmm, and on linux the warnings should also be shown (this actually

Re: [Numpy-discussion] def of var of complex

2008-01-21 Thread Neal Becker
Neal Becker wrote: I noticed that if I generate complex rv i.i.d. with var=1, that numpy says: var (real part) - (close to 1.0) var (imag part) - (close to 1.0) but var (complex array) - (close to complex 0) Is that not a strange definition? I don't think there is any ambiguity

[Numpy-discussion] Optimizing speed for large-array inter-element algorithms (specifically, color space conversion)

2008-01-21 Thread theodore test
Hello all, I'm scratching my head over how to make this image color space conversion from RGB to HSV quicker. It requires input from all three bands of a given pixel at each pixel, and thus can't be easily flattened. I've already implemented psyco and removed the extra step of calling

[Numpy-discussion] Bus Error with object arrays on big endian system

2008-01-21 Thread Christopher Hanley
Hi, The following will cause a bus error on a big endian machine (Solaris 10 Sun in this case): Python 2.5.1 (r251:54863, Jun 29 2007, 15:29:55) [C] on sunos5 Type help, copyright, credits or license for more information. import numpy o = numpy.ndarray(shape=3,dtype=[('SEGMENT', '|S4'),

Re: [Numpy-discussion] Optimizing speed for large-array inter-element algorithms (specifically, color space conversion)

2008-01-21 Thread Hans Meine
Am Montag, 21. Januar 2008 15:39:21 schrieb theodore test: Right now it takes around 9 seconds for a single 1600x1200 RGB image, a conversion that I've seen implemented more or less instantly in, say, ImageJ. What can I do to make this conversion more efficient? You should just remove the

Re: [Numpy-discussion] numpy.distutils does not output compilation warning on win32 ?

2008-01-21 Thread David Cournapeau
Pearu Peterson wrote: Hi, If I remember correctly then the warnings were disabled because when compiling numpy/scipy on windows there were *lots* of warnings, especially for pyrex generated sources. Yes, that's certainly one of the thing I intend to improve with numscons :) (as an aside,

[Numpy-discussion] Optimizing speed for large-array inter-element algorithms (specifically, color space conversion)

2008-01-21 Thread James A. Bednar
| Date: Mon, 21 Jan 2008 09:39:21 -0500 | From: theodore test [EMAIL PROTECTED] | | Hello all, | | I'm scratching my head over how to make this image color space | conversion from RGB to HSV quicker. It requires input from all | three bands of a given pixel at each pixel, and thus can't

[Numpy-discussion] Do not use -fomit-frame-pointer with mingw !

2008-01-21 Thread David Cournapeau
Hi, I don't know if this is known, but since I wasted half a day on it, I thought I could avoid the pain for someone else: do not build numpy with -fomit-frame-pointer with mingw (windows), it will crash. I don't know if this just cannot be used, if this is a mingw bug, or something on

Re: [Numpy-discussion] compiling c extension

2008-01-21 Thread Lou Pecora
Did you include arrayobject.h and call import_array() in the initialization function, after the call to Py_InitModule() ? --- Danny Chan [EMAIL PROTECTED] wrote: Hi! I am trying to compile a c extension that uses numpy arrays on windows. I can compile the extension file, but once I get to

Re: [Numpy-discussion] def of var of complex

2008-01-21 Thread Robert Kern
Neal Becker wrote: Neal Becker wrote: I noticed that if I generate complex rv i.i.d. with var=1, that numpy says: var (real part) - (close to 1.0) var (imag part) - (close to 1.0) but var (complex array) - (close to complex 0) Is that not a strange definition? I don't think there

Re: [Numpy-discussion] Optimizing speed for large-array inter-element algorithms (specifically, color space conversion)

2008-01-21 Thread Bruce Southey
Hi, I don't know the area but following your code I would suggest the completely untested code. I am not sure about the conditions to get h so I leave you get to the correct h and transform it appropriately. Bruce # First create 2 dimensional array/matrix (number of pixels by three): 'rows' are

[Numpy-discussion] Docstring page, out of date?

2008-01-21 Thread Matthew Brett
Hi, Search for the docstring standard, I hit this: http://www.scipy.org/DocstringStandard but I think the current thinking is this: http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines Is that correct? Does the first page apply to matplotlib in some way? Should we change the first

Re: [Numpy-discussion] Optimizing speed for large-array inter-element algorithms (specifically, color space conversion)

2008-01-21 Thread Arnar Flatberg
Hi Theodore Probably not the fastest, but a full example of how you may vectorize your loop. Ran just one test, and that speeded up the original code. Example: from numpy import empty_like def vectorized_rgb2hsv(im): im is a (m, n, 3) array. im = im/255. out =

Re: [Numpy-discussion] Docstring page, out of date?

2008-01-21 Thread Jarrod Millman
On Jan 21, 2008 2:03 PM, Matthew Brett [EMAIL PROTECTED] wrote: Search for the docstring standard, I hit this: http://www.scipy.org/DocstringStandard Good catch, I didn't know this page existed. If I recall correctly, Keir Mierle showed up on the mailing list around the time we were

Re: [Numpy-discussion] Docstring page, out of date?

2008-01-21 Thread Charles R Harris
On Jan 21, 2008 6:09 PM, Jarrod Millman [EMAIL PROTECTED] wrote: On Jan 21, 2008 2:03 PM, Matthew Brett [EMAIL PROTECTED] wrote: Search for the docstring standard, I hit this: http://www.scipy.org/DocstringStandard Good catch, I didn't know this page existed. If I recall correctly,

Re: [Numpy-discussion] maskedarray bug?

2008-01-21 Thread Eric Firing
Pierre GM wrote: On Sunday 20 January 2008 16:32:40 you wrote: Pierre, The attached script shows how one can make a masked array with different dimensions for the mask than for the data. I presume this is a bug. It is triggered by the present code in the matplotlib quiver function. Yep,

Re: [Numpy-discussion] Docstring page, out of date?

2008-01-21 Thread Charles R Harris
On Jan 21, 2008 8:38 PM, Charles R Harris [EMAIL PROTECTED] wrote: On Jan 21, 2008 6:09 PM, Jarrod Millman [EMAIL PROTECTED] wrote: On Jan 21, 2008 2:03 PM, Matthew Brett [EMAIL PROTECTED] wrote: Search for the docstring standard, I hit this: http://www.scipy.org/DocstringStandard

Re: [Numpy-discussion] Docstring page, out of date?

2008-01-21 Thread Robert Kern
David Cournapeau wrote: Nobody likes to write doc, specially if you have to follow many rules. Not being able to see the result does not help. I don't know much about the current documation tools situation with python, but I have seen good, automatically generated doc for python modules: for

Re: [Numpy-discussion] Docstring page, out of date?

2008-01-21 Thread Jarrod Millman
On Jan 21, 2008 7:56 PM, Charles R Harris [EMAIL PROTECTED] wrote: On Jan 21, 2008 8:38 PM, Charles R Harris [EMAIL PROTECTED] wrote: If I hit the source code link in the generated html, it looks like that page was generated from the old document format. The new document format doesn't

[Numpy-discussion] Building a static libnumpy

2008-01-21 Thread Jussi Enkovaara
Hi, I need to use numpy in an environment which does not support shared libraries. Previously, I have used the old Numeric where I created a Makefile to build a static Numeric library which was later on linked to the python interpreter. As far as I understood, numpy uses sort of extended

Re: [Numpy-discussion] Building a static libnumpy

2008-01-21 Thread Matthieu Brucher
Hi, I think the main problem would be that some parts of Numpy are coded in C and that they must be compiled as a shared library so that Python can access them. Matthieu 2008/1/22, Jussi Enkovaara [EMAIL PROTECTED]: Hi, I need to use numpy in an environment which does not support shared

[Numpy-discussion] Sage/Scipy Days 8 reminder: Feb 29-March 4.

2008-01-21 Thread Fernando Perez
Hi all, Just a quick reminder for all about the upcoming Sage/Scipy Days 8 at Enthought collaborative meeting: http://wiki.sagemath.org/days8 Email me directly ([EMAIL PROTECTED]) if you plan on coming, so we can have a proper count and plan accordingly. Cheers, f

Re: [Numpy-discussion] Docstring page, out of date?

2008-01-21 Thread Charles R Harris
On Jan 21, 2008 11:27 PM, Robert Kern [EMAIL PROTECTED] wrote: Charles R Harris wrote: On Jan 21, 2008 6:09 PM, Jarrod Millman [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Jan 21, 2008 2:03 PM, Matthew Brett [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Re: [Numpy-discussion] Building a static libnumpy

2008-01-21 Thread Robert Kern
Jussi Enkovaara wrote: Hi, I need to use numpy in an environment which does not support shared libraries. Previously, I have used the old Numeric where I created a Makefile to build a static Numeric library which was later on linked to the python interpreter. As far as I understood, numpy