Re: [Numpy-discussion] On loop and broadcasting (again)

2006-10-05 Thread David Cournapeau
Travis Oliphant wrote: > David Cournapeau wrote: > >> Hi, >> >> The email from Albert made me look again on some surprising results I >> got a few months ago when starting my first "serious" numpy project. I >> noticed that when computing multivariate gaussian densities, centering >> the data

Re: [Numpy-discussion] repmat

2006-10-05 Thread David Cournapeau
Bill Baxter wrote: > >> I'm not completely sold on the whole reparray thing: does repmat have >> any use outside of the linear algebra convention of squashing a 3D array >> into a 2D matrix (or however that goes)? If not, perhaps it should just >> get left alone and exciled to matrix specific funct

Re: [Numpy-discussion] contribution about history of Numeric

2006-10-05 Thread Fernando Perez
On 10/5/06, Paul Dubois <[EMAIL PROTECTED]> wrote: > I was reading the 'History of SciPy' page and noticed the discussion about > Numeric. Here's the true story about why the various names for the original: > numpy, Numeric, Numerical. I added this to the wiki page (http://www.scipy.org/History_of

[Numpy-discussion] contribution about history of Numeric

2006-10-05 Thread Paul Dubois
I was reading the 'History of SciPy' page and noticed the discussion about Numeric. Here's the true story about why the various names for the original: numpy, Numeric, Numerical.At the time Source Forge was pretty young, and I decided to put the project there. We all said 'numpy' informally not Num

[Numpy-discussion] [OT] Interesting interview with Pearu (f2py and others...)

2006-10-05 Thread Fernando Perez
Hi all, since this is not about me, I think it's fair to plug an interview :) http://www.pythonthreads.com/articles/interviews/once-i-learned-about-python,-i-stopped-trying-out-different-languages.html contains a very nice interview with Pearu, where in fact I learned a number of interesting thi

Re: [Numpy-discussion] repmat

2006-10-05 Thread Bill Baxter
On 10/6/06, Tim Hochberg <[EMAIL PROTECTED]> wrote: > Bill Baxter wrote: > > In short, repmat(A, M,N) is an oddball. It only deals with 2D arrays. > > > > We should do some combination of: > > 1) change repmat(A, M,N) to repmat(A, *dims) to add multidim ability > > to it, while maintaining backwar

Re: [Numpy-discussion] repmat

2006-10-05 Thread Tim Hochberg
Bill Baxter wrote: > [There seem to have been some gmail delivery problems that prevented > my previous mail on this subject from being delivered] > > I've proposed that we fix repmat handle arbitrary dimensions before 1.0. > >http://projects.scipy.org/scipy/numpy/ticket/292 > > I don't think t

[Numpy-discussion] repmat

2006-10-05 Thread Bill Baxter
[There seem to have been some gmail delivery problems that prevented my previous mail on this subject from being delivered] I've proposed that we fix repmat handle arbitrary dimensions before 1.0. http://projects.scipy.org/scipy/numpy/ticket/292 I don't think this is particularly controversia

Re: [Numpy-discussion] Memory errors

2006-10-05 Thread Robert Kern
If you are going to start a new topic, please start a new thread as well, instead of replying to a message. Thanks. Vikalpa Jetly wrote: > I am reading a very large array (~9000,11000) of 1 byte image values. I need > to change values in the array that meet a certain condition so I am running > s

Re: [Numpy-discussion] Memory errors

2006-10-05 Thread Travis Oliphant
Vikalpa Jetly wrote: >I am reading a very large array (~9000,11000) of 1 byte image values. I need >to change values in the array that meet a certain condition so I am running >something like: > >b = numpy.where(a>200,0,1) > >to create a new array with the changed values. However, I get a >"Memory

[Numpy-discussion] Memory errors

2006-10-05 Thread Vikalpa Jetly
I am reading a very large array (~9000,11000) of 1 byte image values. I need to change values in the array that meet a certain condition so I am running something like: b = numpy.where(a>200,0,1) to create a new array with the changed values. However, I get a "MemoryError" everytime I try this.

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread A. M. Archibald
On 05/10/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > I think a hybrid for weave / f2py / ctypes that allows "inlining in > multiple languages" as well as automatic extension module generation for > "already-written" code is in order. It might make sense to also include SWIG (since that seems

Re: [Numpy-discussion] flat indexing of object arrays

2006-10-05 Thread Travis Oliphant
Matthew Brett wrote: >Hi, > >On 10/5/06, Martin Wiechert <[EMAIL PROTECTED]> wrote: > > >>Hi list, >> >>when I try to assign a sequence as an element of an object array via flat >>indexing only the first element of the sequence is assigned: >> >> > >I've also been having trouble with flat on

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Travis Oliphant
A. M. Archibald wrote: >On 05/10/06, Greg Willden <[EMAIL PROTECTED]> wrote: > > >>On 10/5/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: >> >> >>>Perhaps that is the best way to move forward along with the work on a >>>"pylab" super-package. >>> >>> >>That is exactly what I want. >>

Re: [Numpy-discussion] flat indexing of object arrays

2006-10-05 Thread Travis Oliphant
Martin Wiechert wrote: >Hi list, > >when I try to assign a sequence as an element of an object array via flat >indexing only the first element of the sequence is assigned: > > > import numpy numpy.version.version >'1.0rc1.dev3171' > > from numpy import * a =

Re: [Numpy-discussion] flat indexing of object arrays

2006-10-05 Thread Matthew Brett
Hi, On 10/5/06, Martin Wiechert <[EMAIL PROTECTED]> wrote: > Hi list, > > when I try to assign a sequence as an element of an object array via flat > indexing only the first element of the sequence is assigned: I've also been having trouble with flat on object arrays. Is this intended? In [1]:

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Christopher Barker
The situation is confusing, we all know that, and we all want to move toward a better way. Key to that is that SciPy needs to be easier to build and install -- that's happening, but I don't know that it's there yet. Maybe it can be built on Fedora Core 4 now, but last I tried it couldn't be. A

Re: [Numpy-discussion] Problems with Numexpr and discontiguous arrays

2006-10-05 Thread Tim Hochberg
Travis Oliphant wrote: > Tim Hochberg wrote: > > >>> That would be easy to do. Right now the opcodes should work correctly >>> on data that is spaced in multiples of the itemsize on the last axis. >>> Other arrays are copied (no opcode required, it's embedd

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Albert Strasheim
Hello all Some comments from a Windows user's perspective. On Thu, 05 Oct 2006, Travis Oliphant wrote: > John Hunter wrote: > > >>"Robert" == Robert Kern <[EMAIL PROTECTED]> writes: > > > >Robert> IMO, I'd rather see this and similar functions go into > >Robert> scipy. New functions

[Numpy-discussion] flat indexing of object arrays

2006-10-05 Thread Martin Wiechert
Hi list, when I try to assign a sequence as an element of an object array via flat indexing only the first element of the sequence is assigned: >>> import numpy >>> numpy.version.version '1.0rc1.dev3171' >>> from numpy import * >>> a = ndarray ((2,2), object) >>> a.flat [2] = (1, 2, 3) >>> a.fla

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread A. M. Archibald
On 05/10/06, Greg Willden <[EMAIL PROTECTED]> wrote: > On 10/5/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > Perhaps that is the best way to move forward along with the work on a > > "pylab" super-package. > > That is exactly what I want. What is unsatisfactory about installing numpy+scipy+ma

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Alan G Isaac
> On 10/5/06, John Hunter <[EMAIL PROTECTED]> wrote: >> I would be nice to have as much as possible in the most >> widely distributed package IMO. On Thu, 5 Oct 2006, Greg Willden apparently wrote: > That is a much better policy in my view. A user's perspective: Well yes, all else equal, I

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Robert Kern
Greg Willden wrote: > On 10/5/06, *Robert Kern* <[EMAIL PROTECTED] > > wrote: > > Greg Willden wrote: > > > From my view as a newbie to numpy/scipy/matplotlib it isn't > clear where > > I should look for what functionality. Matplotlib plots the >

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Greg Willden
On 10/5/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: Perhaps that is the best way to move forward along with the work on a"pylab" super-package.That is exactly what I want.  In the end I want a nice collection of functions, logically organized, that let me analyze/filter/plot etc. etc. etc. The k

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Greg Willden
On 10/5/06, Robert Kern <[EMAIL PROTECTED]> wrote: Greg Willden wrote:>  From my view as a newbie to numpy/scipy/matplotlib it isn't clear where> I should look for what functionality.  Matplotlib plots the spectrogram> but it only supports two or three window functions.  Numpy supports 4 or > 5 win

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Travis Oliphant
John Hunter wrote: >>"Robert" == Robert Kern <[EMAIL PROTECTED]> writes: >> >> > >Robert> IMO, I'd rather see this and similar functions go into >Robert> scipy. New functions that apply semantics to arrays (in >Robert> this case, treating them as time series), I

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread A. M. Archibald
On 05/10/06, Greg Willden <[EMAIL PROTECTED]> wrote: > That is a much better policy in my view. > > I (gently) encourage this group (Travis?) to make this the policy for > Numpy/Scipy. > > From my view as a newbie to numpy/scipy/matplotlib it isn't clear where I > should look for what functionalit

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Robert Kern
Greg Willden wrote: > From my view as a newbie to numpy/scipy/matplotlib it isn't clear where > I should look for what functionality. Matplotlib plots the spectrogram > but it only supports two or three window functions. Numpy supports 4 or > 5 window functions and Scipy apparently supports

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Greg Willden
On 10/5/06, John Hunter <[EMAIL PROTECTED]> wrote: I prefer Perry's longstanding suggestion: things that do not add todistribution complexity should go into numpy.  If it compiles aseasily as numpy itself, it should go into numpy where sensible.  Itremains a fact of life that numpy gets a wider dis

Re: [Numpy-discussion] zip safe egg?

2006-10-05 Thread Bryce Hendrix
Robert Kern wrote: Perhaps the best solution is to complain to the setuptools list, I'm just looking for a quick fix for now. Patch setup.py in our build system, I would think. Thats what I did, but patching working copies of files has been troublesome in the past when

Re: [Numpy-discussion] zip safe egg?

2006-10-05 Thread Robert Kern
Bryce Hendrix wrote: > Robert Kern wrote: >> It is not zip-safe if you want to compile against the headers. That keyword >> can't be added to the setup() call in the trunk's setup.py because numpy >> cannot >> depend on setuptools, at the moment. >> > Adding the keyword does not break builds not

Re: [Numpy-discussion] zip safe egg?

2006-10-05 Thread Bryce Hendrix
Robert Kern wrote: > It is not zip-safe if you want to compile against the headers. That keyword > can't be added to the setup() call in the trunk's setup.py because numpy > cannot > depend on setuptools, at the moment. > > Adding the keyword does not break builds not using setuptools, the bu

Re: [Numpy-discussion] zip safe egg?

2006-10-05 Thread Robert Kern
Bryce Hendrix wrote: > Is anyone using the numpy egg compressed? Recent versions of setuptools > seem to think it is zip safe, but this causes builds to fail which > compile with the numpy headers. Can we change the setup.py to default to > not zip safe (by adding zip_safe=False as a keyword arg

[Numpy-discussion] zip safe egg?

2006-10-05 Thread Bryce Hendrix
Is anyone using the numpy egg compressed? Recent versions of setuptools seem to think it is zip safe, but this causes builds to fail which compile with the numpy headers. Can we change the setup.py to default to not zip safe (by adding zip_safe=False as a keyword arg to the setup function call)

Re: [Numpy-discussion] Problems with Numexpr and discontiguous arrays

2006-10-05 Thread Tim Hochberg
Ivan Vilata i Balaguer wrote: > En/na Tim Hochberg ha escrit:: > > >> Ivan Vilata i Balaguer wrote: >> >>> It seemed that discontiguous arrays worked OK in Numexpr since r1977 or >>> so, but I have come across some alignment or striding problems which can >>> be seen with the following code

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread John Hunter
> "Robert" == Robert Kern <[EMAIL PROTECTED]> writes: Robert> IMO, I'd rather see this and similar functions go into Robert> scipy. New functions that apply semantics to arrays (in Robert> this case, treating them as time series), I think should Robert> go into scipy. New funct

Re: [Numpy-discussion] Problems with Numexpr and discontiguous arrays

2006-10-05 Thread Ivan Vilata i Balaguer
En/na Tim Hochberg ha escrit:: > Tim Hochberg wrote: Ivan Vilata i Balaguer wrote: > It seemed that discontiguous arrays worked OK in Numexpr since > r1977 or > so, but I have come across some alignment or striding problems > which can > be seen with the following code::

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Greg Willden
On 10/5/06, Robert Kern <[EMAIL PROTECTED]> wrote: IMO, I'd rather see this and similar functions go into scipy. New functions thatapply semantics to arrays (in this case, treating them as time series), I thinkshould go into scipy. New functions that treat arrays simply as arrays and are generally

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Robert Kern
Greg Willden wrote: > On 10/4/06, *Travis Oliphant* <[EMAIL PROTECTED] > > wrote: > > Great contribution. Thanks a bunch. I think this will probably go into > the scipy package, though. There is already a lot of windows available > in the scipy.signal.wind

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Greg Willden
On 10/4/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: Great contribution.  Thanks a bunch.  I think this will probably go intothe scipy package, though.  There is already a lot of windows availablein the scipy.signal.window function.BTW.  Is there some sort of clear statement about what goes in Sc

Re: [Numpy-discussion] Problems with Numexpr and discontiguous arrays

2006-10-05 Thread Travis Oliphant
Tim Hochberg wrote: >>> >>> >>> >>That would be easy to do. Right now the opcodes should work correctly >>on data that is spaced in multiples of the itemsize on the last axis. >>Other arrays are copied (no opcode required, it's embedded at the top >>of interp_body lines 64-80). The reco

Re: [Numpy-discussion] On loop and broadcasting (again)

2006-10-05 Thread Travis Oliphant
David Cournapeau wrote: >Hi, > > The email from Albert made me look again on some surprising results I >got a few months ago when starting my first "serious" numpy project. I >noticed that when computing multivariate gaussian densities, centering >the data was more expensive than everything e

[Numpy-discussion] On loop and broadcasting (again)

2006-10-05 Thread David Cournapeau
Hi, The email from Albert made me look again on some surprising results I got a few months ago when starting my first "serious" numpy project. I noticed that when computing multivariate gaussian densities, centering the data was more expensive than everything else, including exponentiation.

Re: [Numpy-discussion] Vectorizing code, for loops, and all that

2006-10-05 Thread Travis Oliphant
Travis Oliphant wrote: >Albert Strasheim wrote: > > [1] 12.97% of function time [2] 8.65% of functiont ime [3] 62.14% of function time If statistics from elsewhere in the code would be helpful, let me know, >>>and >>> >>> >>> I

Re: [Numpy-discussion] Problems with Numexpr and discontiguous arrays

2006-10-05 Thread Tim Hochberg
Tim Hochberg wrote: > David M. Cooke wrote: >> On Wed, 04 Oct 2006 10:19:08 -0700 >> Tim Hochberg <[EMAIL PROTECTED]> wrote: >> >> >>> Ivan Vilata i Balaguer wrote: >>> It seemed that discontiguous arrays worked OK in Numexpr since r1977 or so, but I have come across some alig

Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread Greg Willden
On 10/4/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: Not really, because these functions were in *both* Numeric andnumarray.  That's the trouble.And the multiple scipy packages situation needs more discussion Weare all ears...Well I started here because I have been using the Matplotlib packag

Re: [Numpy-discussion] Problems with Numexpr and discontiguous arrays

2006-10-05 Thread Ivan Vilata i Balaguer
En/na Tim Hochberg ha escrit:: > Ivan Vilata i Balaguer wrote: >> It seemed that discontiguous arrays worked OK in Numexpr since r1977 or >> so, but I have come across some alignment or striding problems which can >> be seen with the following code:: > I looked at this just a little bit and clearl

[Numpy-discussion] compatibility of extension modules

2006-10-05 Thread Christian Kristukat
Hi, i've got problems running a numpy/scipy extension module (scipy.sandbox.odr) built with cygwin/mingw32 on XP on other machines (windows 2000). I get those very informative 'windows encountered a problem' messages when calling the extension module - importing seems to work. Is there any optimiza