Re: [Numpy-discussion] Histograms of extremely large data sets

2006-12-12 Thread eric jones
Hey Cameron, I wrote a simple weave based histogram function that should work for your problem. It should work for any array input data type. The needed files (and a few tests and examples) are attached. Below is the output from the histogram_speed.py file attached. The test takes about 1

[Numpy-discussion] Histograms of extremely large data sets

2006-12-12 Thread Cameron Walsh
Hi all, I'm trying to generate histograms of extremely large datasets. I've tried a few methods, listed below, all with their own shortcomings. Mailing-list archive and google searches have not revealed any solutions. Method 1: import numpy import matplotlib data=numpy.empty((489,1000,1000),dt

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread David Cournapeau
Tim Hochberg wrote: > > So rather than "fixing" the function, I would first propose introducing > a function with a more descriptive name and docstring , for example you > could steal the name 'xcorr' from matlab. Then if in fact the behavior > of correlate is deemed to be an error, deprecate it

Re: [Numpy-discussion] a.T

2006-12-12 Thread Pierre GM
On Tuesday 12 December 2006 19:02, Charles R Harris wrote: > Hi all, > > I'm curious about the error thrown when I use a.T as the left side of a > multiply assign. I Chuck, if you keep in mind that .T is a shortcut for .transpose(), you'll understand why you can't assign to a function call. _

Re: [Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

2006-12-12 Thread Charles R Harris
On 12/12/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: Tim Hirzel wrote: >Good thought Chris, >Normal reading and writing does seem to work. .. >But, my friend Daniel figured out a workaround when I asked to confirm >this behavior on his windows setup (and it is does behave the same for >him).

[Numpy-discussion] a.T

2006-12-12 Thread Charles R Harris
Hi all, I'm curious about the error thrown when I use a.T as the left side of a multiply assign. In the following, I am multiplying each the rows of 'a' by the corresponding element of arange(n), i.e., broadcasting from the left. The result looks fine, but an error is thrown after the operation i

Re: [Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

2006-12-12 Thread Lisandro Dalcin
> > It seems to me that the temporary file mechanism on Windows is a little > odd. > Indeed, looking at sources, the posix version uses the mkstemp/unlink idiom.. but in win it uses a bit of hackery. It seems opened files cannot be unlinked. if _os.name != 'posix' or _os.sys.platform == 'cygwin'

Re: [Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

2006-12-12 Thread Travis Oliphant
Tim Hirzel wrote: >Good thought Chris, >Normal reading and writing does seem to work. .. >But, my friend Daniel figured out a workaround when I asked to confirm >this behavior on his windows setup (and it is does behave the same for >him). The first clue was this: > > >>> f = tempfile.Temporar

Re: [Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

2006-12-12 Thread Tim Hirzel
Good thought Chris, Normal reading and writing does seem to work. .. But, my friend Daniel figured out a workaround when I asked to confirm this behavior on his windows setup (and it is does behave the same for him). The first clue was this: >>> f = tempfile.TemporaryFile() >>> type(f) >>>

Re: [Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

2006-12-12 Thread Christopher Barker
did you try reading and writing to/from that temp file with regular old python functions? -Chris Tim Hirzel wrote: >> I'm running linux and the current svn version of numpy. Maybe the >> problem is with the tempfile module on windows. Do fromfile and tofile >> work for files opened normally?

[Numpy-discussion] Installation - Numpy 1.0.1 Suse Linux 10.1

2006-12-12 Thread Gustavo Mercier
Hi! I am trying to install Numpy 1.0.1 in a Linux Box (Suse Linux 10.1; gcc 4.1x). I have done this successfully with previous versions up to 1.0b5. However, I now run into problems. It compiles and installs ok, but upon opening python and importing numpy it hangs with an unresolved reference

Re: [Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

2006-12-12 Thread Tim Hirzel
> I'm running linux and the current svn version of numpy. Maybe the > problem is with the tempfile module on windows. Do fromfile and tofile > work for files opened normally? > > Chuck fromfile and tofile work fine on regular files. From skimming the code a bit, it's hard to imagine numpy cod

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread Travis Oliphant
> > On 12/12/06, *David Cournapeau* <[EMAIL PROTECTED] > > wrote: > > Hi, > > I am polishing some code to compute autocorrelation using fft, and > when testing the code against numpy.correlate, I realised that I > am not > sure about the definitio

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread Alan G Isaac
On Tue, 12 Dec 2006, Tim Hochberg apparently wrote: > So rather than "fixing" the function, I would first > propose introducing a function with a more descriptive > name and docstring , for example you could steal the name > 'xcorr' from matlab. Then if in fact the behavior of > correlate is d

Re: [Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

2006-12-12 Thread Charles R Harris
On 12/12/06, Tim Hirzel <[EMAIL PROTECTED]> wrote: Hi Chuck, Thanks for checking that. I am running numpy 1.0.1 in python 2.4 on win32 (xp). Are you on linux? I double checked the behavior in 1.0 and 1.0.1, just to be extra sure, and it thows the IOError in both cases. tim I'm running lin

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread Tim Hochberg
David Cournapeau wrote: > Charles R Harris wrote: > >> On 12/12/06, *David Cournapeau* <[EMAIL PROTECTED] >> > wrote: >> >> Hi, >> >> I am polishing some code to compute autocorrelation using fft, and >> when testing the code against numpy.correlate, I

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread Pierre GM
> +1 for a change. I'm not using the current implementation. Since it was > undocumented, I prefered coding my own. Same case as David. I found it easier to code something with FFTs than trying to understand what was going on. ___ Numpy-discussion mail

Re: [Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

2006-12-12 Thread Tim Hirzel
Hi Chuck, Thanks for checking that. I am running numpy 1.0.1 in python 2.4 on win32 (xp). Are you on linux? I double checked the behavior in 1.0 and 1.0.1, just to be extra sure, and it thows the IOError in both cases. tim Charles R Harris wrote: > > > On 12/11/06, *Tim Hirzel* <[EMAIL PROTE

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread David Huard
- if not, is this behavior so unexpected as to be considered a bug? - are many existing applications depending on it? The worst case is: it is a bug, but many existing users depend on the current behavior. I am not taking a position, but that seems the current view on this list. I hope that *i

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread Alan G Isaac
> On 12/12/06, David Cournapeau <[EMAIL PROTECTED]> wrote: >> I am polishing some code to compute autocorrelation using >> fft, and when testing the code against numpy.correlate, >> I realised that I am not sure about the definition... >> There are various function related to correlation as far

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread David Cournapeau
Charles R Harris wrote: > > > On 12/12/06, *David Cournapeau* <[EMAIL PROTECTED] > > wrote: > > Hi, > > I am polishing some code to compute autocorrelation using fft, and > when testing the code against numpy.correlate, I realised that I > am not >

Re: [Numpy-discussion] Definition of correlation, correlate and so on ?

2006-12-12 Thread Charles R Harris
On 12/12/06, David Cournapeau <[EMAIL PROTECTED]> wrote: Hi, I am polishing some code to compute autocorrelation using fft, and when testing the code against numpy.correlate, I realised that I am not sure about the definition... There are various function related to correlation as far as nu

Re: [Numpy-discussion] numpy book

2006-12-12 Thread Sven Schreiber
Travis Oliphant schrieb: >> Note that this is not a request to Travis to send me the latest version >> by private email. That would be inefficient and my need is not that >> urgent. Nevertheless I think that issue should be settled. >> >> > There will be an update, soon. I'm currently working on