Re: [Numpy-discussion] eigenface image too dark

2008-03-19 Thread Nadav Horesh
I never used the putdata interface but the fromstring. It is likely that "putdata" is more flexible. However I urge you to use matplotlib: plotting with "imshow" followed by colorbar(), enables use to inspect the true pixels value, add grids, zoom etc. Nadav. -הודעה מקורית- מאת: [E

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-19 Thread David Cournapeau
Charles R Harris wrote: > > > Image processing may be a special in that many cases it is almost > embarrassingly parallel. Perhaps some special libraries for that sort > of application could be put together and just bits of c code be run on > different processors. Not that I know much about para

[Numpy-discussion] JOB: Short-term programming (consultant) work

2008-03-19 Thread Rob Clewley
Dear NumPy users, The developers of the PyDSTool dynamical systems software project have money to hire a Python programmer on a short-term, per-task basis as a technical consultant. The work can be done remotely and will be paid after the completion of project milestones. The work must be complete

Re: [Numpy-discussion] bug with with fill_values in maske d arrays?

2008-03-19 Thread Matt Knox
> > OK, my specific problem with masked arrays is as follows: > > >>> a = numpy.array([1,numpy.nan,2]) > >>> aa = numpy.ma.masked_where(numpy.isnan(a),a) > >>> aa > array(data = > [ 1.e+00 1.e+20 2.e+00], >mask = > [False True False], >fill_val

Re: [Numpy-discussion] Correlate with small arrays

2008-03-19 Thread Robert Kern
On Wed, Mar 19, 2008 at 12:57 PM, Peter Creasey <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to do a PDE style calculation with numpy arrays > > y = a * x[:-2] + b * x[1:-1] + c * x[2:] > > with a,b,c constants. I realise I could use correlate for this, i.e > > y = numpy.correlate(x, array((

[Numpy-discussion] NumPy 1.0.5 almost ready

2008-03-19 Thread Jarrod Millman
Hello, Thanks to everyone who has been working on getting the 1.0.5 release of NumPy out the door. Since my last email at least 12 bug tickets have been closed. There are a few remaining issues with the trunk, but we are fasting approaching a release. One additional issue that I would like to s

[Numpy-discussion] Correlate with small arrays

2008-03-19 Thread Peter Creasey
Hi, I'm trying to do a PDE style calculation with numpy arrays y = a * x[:-2] + b * x[1:-1] + c * x[2:] with a,b,c constants. I realise I could use correlate for this, i.e y = numpy.correlate(x, array((a, b, c))) however the performance doesn't seem as good (I suspect correlate is optimised fo

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-19 Thread Charles R Harris
On Wed, Mar 19, 2008 at 11:30 AM, Lou Pecora <[EMAIL PROTECTED]> wrote: > I recently had a personal email reply from Damian > Menscher who originally found the error in 2002. He > states: > > -- > > I explained the solution in a followup to my own post: > http://mail.python.org/pipermail/pyth

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-19 Thread Lou Pecora
I recently had a personal email reply from Damian Menscher who originally found the error in 2002. He states: -- I explained the solution in a followup to my own post: http://mail.python.org/pipermail/python-list/2002-August/161395.html -- in short, find the dlasd4_ routine (for the current

Re: [Numpy-discussion] Can't add user defined complex types

2008-03-19 Thread Charles R Harris
On Wed, Mar 19, 2008 at 10:42 AM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > Neal Becker wrote: > > In arrayobject.c, various complex functions (e.g., array_imag_get) use: > > PyArray_ISCOMPLEX -> PyTypeNum_ISCOMPLEX, > > which is hard coded to 2 predefined types :( > > > > If PyArray_ISCOMPL

Re: [Numpy-discussion] Can't add user defined complex types

2008-03-19 Thread Neal Becker
Travis E. Oliphant wrote: > Neal Becker wrote: >> In arrayobject.c, various complex functions (e.g., array_imag_get) use: >> PyArray_ISCOMPLEX -> PyTypeNum_ISCOMPLEX, >> which is hard coded to 2 predefined types :( >> >> If PyArray_ISCOMPLEX allowed user-defined types, I'm guessing functions >> su

Re: [Numpy-discussion] Can't add user defined complex types

2008-03-19 Thread Travis E. Oliphant
Neal Becker wrote: > In arrayobject.c, various complex functions (e.g., array_imag_get) use: > PyArray_ISCOMPLEX -> PyTypeNum_ISCOMPLEX, > which is hard coded to 2 predefined types :( > > If PyArray_ISCOMPLEX allowed user-defined types, I'm guessing functions such > as array_imag_get would just wo

Re: [Numpy-discussion] Help needed with numpy 10.5 release blockers

2008-03-19 Thread Matthieu Brucher
For the not blocker bugs, I think that #420 should be closed : float32 is the the C float type, isn't it ? Matthieu 2008/3/13, Jarrod Millman <[EMAIL PROTECTED]>: > > Hello, > > I am sure that everyone has noticed that 1.0.5 hasn't been released > yet. The main issue is that when I was getting r

Re: [Numpy-discussion] documentation for masked arrays?

2008-03-19 Thread Chris Withers
Bill Spotz wrote: > I have found that any search on that document containing an > underscore will turn up zero matches. Substitute a space instead. That's not been my experience. I found the *one* mention of fill_value just fine, the coverage of masked arrays is woeful :-( Chris -- Simplist

Re: [Numpy-discussion] C++ class encapsulating ctypes-numpy array?

2008-03-19 Thread Matthieu Brucher
Hi, On my blog, I spoke about the class we used. It is not derived from a Numpy array, it is implemented in terms of a Numpy array ( http://matt.eifelle.com/item/5) Matthieu 2008/3/19, Joris De Ridder <[EMAIL PROTECTED]>: > > Hi, > > I'm passing (possibly non-contiguous) numpy arrays (data + sha

[Numpy-discussion] C++ class encapsulating ctypes-numpy array?

2008-03-19 Thread Joris De Ridder
Hi, I'm passing (possibly non-contiguous) numpy arrays (data + shape + strides + ndim) with ctypes to my C++ function (with external "C" to make ctypes happy). Has anyone made a C++ class derived from a ctypes- numpy-array with an overloaded [] operator to allow easy indexing (e.g. x[0][2][

Re: [Numpy-discussion] documentation for masked arrays?

2008-03-19 Thread Bill Spotz
I have found that any search on that document containing an underscore will turn up zero matches. Substitute a space instead. On Mar 19, 2008, at 5:02 AM, Chris Withers wrote: > Where can I find docs for masked arrays? > The "paid for" book doesn't even contain the phrase "masked_where" :-( *

Re: [Numpy-discussion] eigenface image too dark

2008-03-19 Thread royG
> Longer solution: >Scale your array: > a_min = inputarray.min() > a_max = inputarray.max() > disp_array = ((inputarray-a_min)* 255/(a_max - a_min)).astype('uint8')\ > . thanx Nadav..the scaling works..and makes clear images but why .astype("uint8") ? can't i use the a

Re: [Numpy-discussion] SVD error in Numpy. Bug?

2008-03-19 Thread Lou Pecora
I tried sending this message yesterday, but it is being held up because the MatrixMarket attachment is too large. The moderator my release it to the group, but I don't know so I am sending the original message minus the attachment. If anyone wants the MatrixMarket version of my problem matrix, ju

[Numpy-discussion] Unable to file bug

2008-03-19 Thread Neal Becker
http://scipy.org/scipy/numpy/newticket#preview is giving me: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and an

[Numpy-discussion] Can't add user defined complex types

2008-03-19 Thread Neal Becker
In arrayobject.c, various complex functions (e.g., array_imag_get) use: PyArray_ISCOMPLEX -> PyTypeNum_ISCOMPLEX, which is hard coded to 2 predefined types :( If PyArray_ISCOMPLEX allowed user-defined types, I'm guessing functions such as array_imag_get would just work? _

[Numpy-discussion] bug with with fill_values in masked arrays?

2008-03-19 Thread Chris Withers
OK, my specific problem with masked arrays is as follows: >>> a = numpy.array([1,numpy.nan,2]) >>> aa = numpy.ma.masked_where(numpy.isnan(a),a) >>> aa array(data = [ 1.e+00 1.e+20 2.e+00], mask = [False True False], fill_value=1e+020) >>> numpy.

[Numpy-discussion] documentation for masked arrays?

2008-03-19 Thread Chris Withers
Hi All, Where can I find docs for masked arrays? The "paid for" book doesn't even contain the phrase "masked_where" :-( cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Numpy-dis

Re: [Numpy-discussion] eigenface image too dark

2008-03-19 Thread Nadav Horesh
Easy solution: Use pylab's imashow(inputarray). In general ipython+matplolib are very handy for your kind of analysis Longer solution: Scale your array: a_min = inputarray.min() a_max = inputarray.max() disp_array = ((inputarray-a_min)* 255/(a_max - a_min)).astype('uint8')\