Re: [Numpy-discussion] Different results from repeated calculation

2007-02-01 Thread Keith Goodman
On 2/1/07, Robert Kern <[EMAIL PROTECTED]> wrote: Keith Goodman wrote: > A port to Octave of the test script works fine on the same system. Are you sure that your Octave port uses ATLAS to do the matrix product? Could you post your port? Here's the port. Yes, Octave uses atlas for matrix multi

Re: [Numpy-discussion] Different results from repeated calculation

2007-02-01 Thread Charles R Harris
On 2/1/07, Keith Goodman <[EMAIL PROTECTED]> wrote: On 2/1/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > This problem may be related to this bug: > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279294 It says it is fixed in libc6 2.3.5. I'm on 2.3.6. But do you think it is something simi

Re: [Numpy-discussion] Different results from repeated calculation

2007-02-01 Thread Robert Kern
Keith Goodman wrote: > A port to Octave of the test script works fine on the same system. Are you sure that your Octave port uses ATLAS to do the matrix product? Could you post your port? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made t

Re: [Numpy-discussion] Different results from repeated calculation

2007-02-01 Thread Keith Goodman
On 2/1/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > This problem may be related to this bug: > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279294 It says it is fixed in libc6 2.3.5. I'm on 2.3.6. But do you think it is something similar? A port to Octave of the test script works fine on

Re: [Numpy-discussion] Different results from repeated calculation

2007-02-01 Thread Charles R Harris
On 1/28/07, Keith Goodman <[EMAIL PROTECTED]> wrote: On 1/27/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > On 1/27/07, Fernando Perez <[EMAIL PROTECTED]> wrote: > > It's definitely looking like something SMP related: on my laptop, with > > everything other than the hardware being identical (Lin

Re: [Numpy-discussion] [SciPy-user] Release 0.6.1 of pyaudio, renamed pyaudiolab

2007-02-01 Thread David Cournapeau
Alan G Isaac wrote: > On Wed, 31 Jan 2007, David Cournapeau apparently wrote: >> With pyaudiolab, you should be able to read and write most >> common audio files from and to numpy arrays. The >> underlying IO operations are done using libsndfile from >> Erik Castro Lopo (http://www.mega-nerd.co

Re: [Numpy-discussion] [SciPy-user] Release 0.6.1 of pyaudio, renamed pyaudiolab

2007-02-01 Thread Alan G Isaac
On Wed, 31 Jan 2007, David Cournapeau apparently wrote: > With pyaudiolab, you should be able to read and write most > common audio files from and to numpy arrays. The > underlying IO operations are done using libsndfile from > Erik Castro Lopo (http://www.mega-nerd.com/libsndfile/) I think i

Re: [Numpy-discussion] Complex arange

2007-02-01 Thread Robert Kern
Russel Howe wrote: >> arange(1j, 5j, 1) do? Numeric raises an exception here, and I thing >> numpy >> should, too. > > The same as arange(1, 5, 1j) - an empty array since it takes 0 of the > step to cross the distance. I'm not sure that's really the answer. I think it's simply not defined. N

Re: [Numpy-discussion] Complex arange

2007-02-01 Thread Russel Howe
> arange(1j, 5j, 1) do? Numeric raises an exception here, and I thing > numpy > should, too. > The same as arange(1, 5, 1j) - an empty array since it takes 0 of the step to cross the distance. But something like arange(1j, 5j, 1j) seems fine. As does arange(1j, 3+5j, 2+1j) which should gi

Re: [Numpy-discussion] Complex arange

2007-02-01 Thread Timothy Hochberg
On 2/1/07, Robert Kern <[EMAIL PROTECTED]> wrote: Russel Howe wrote: (It's good to see so many Rudds seeing sense and using Python and numpy. ;-)) rudds! Here? Dear me. -- //=][=\\ [EMAIL PROTECTED] ___ Numpy-discussion mailing list Numpy-disc

Re: [Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Robert Kern
Christopher Barker wrote: > Sebastian Haase wrote: > >> Could you explain what a possible downside of this would be !? >> It seems that if you don't need to refer to a specific "self" object >> that a class-method is what it should - is this not always right !? > > Well, what these really are are

Re: [Numpy-discussion] New may_share_memory function

2007-02-01 Thread Christopher Barker
thanks Travis, Now I just need to remember it's there when I need it! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main rece

Re: [Numpy-discussion] Complex arange

2007-02-01 Thread Robert Kern
Russel Howe wrote: (It's good to see so many Rudds seeing sense and using Python and numpy. ;-)) > Should this work? > > Python 2.4.3 (#1, Dec 27 2006, 21:18:13) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >

[Numpy-discussion] New may_share_memory function

2007-02-01 Thread Travis Oliphant
In SVN there is a new function may_share_memory(a,b) which will return True if the memory foot-print of the two arrays over-lap. >>> may_share_memory(a, flipud(a)) True This is based on another utility function byte_bounds that returns the byte-boundaries of any object exporting the Python s

Re: [Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Christopher Barker
Sebastian Haase wrote: > Could you explain what a possible downside of this would be !? > It seems that if you don't need to refer to a specific "self" object > that a class-method is what it should - is this not always right !? Well, what these really are are alternate constructors. I don't thin

Re: [Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Travis Oliphant
Christopher Barker wrote: >Travis Oliphant wrote: > > >>I'm thinking that we should have several. For example all the fromXXX >>functions should probably be classmethods >> >>ndarray.frombuffer >>ndarray.fromfile >> >> > >would they still be accessible in their functional form in the numpy

Re: [Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Travis Oliphant
Sebastian Haase wrote: >Travis, >Could you explain what a possible downside of this would be !? >It seems that if you don't need to refer to a specific "self" object >that a class-method is what it should - is this not always right !? > > > I don't understand the last point. Classmethods would

[Numpy-discussion] Complex arange

2007-02-01 Thread Russel Howe
Should this work? Python 2.4.3 (#1, Dec 27 2006, 21:18:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as N >>> N.__version__ '1.0.2.dev3531' >>> N.arange(1j, 5j) array([], dtype=complex128) >>>

Re: [Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Sebastian Haase
Travis, Could you explain what a possible downside of this would be !? It seems that if you don't need to refer to a specific "self" object that a class-method is what it should - is this not always right !? -Sebastian On 2/1/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Travis Oliphant wrote: >

Re: [Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Christopher Barker
Travis Oliphant wrote: > I'm thinking that we should have several. For example all the fromXXX > functions should probably be classmethods > > ndarray.frombuffer > ndarray.fromfile would they still be accessible in their functional form in the numpy namespace? -- Christopher Barker, Ph.D. Oc

Re: [Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Robert Kern
Travis Oliphant wrote: > What is the attitude of this group about the ndarray growing some class > methods? Works for me. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Pierre GM
On Thursday 01 February 2007 18:48:56 Travis Oliphant wrote: > What is the attitude of this group about the ndarray growing some class > methods? > ndarray.frombuffer > ndarray.fromfile Sounds great. But what would really make my semester is to have ndarray.__new__ accept optional keywords (as *

[Numpy-discussion] classmethods for ndarray

2007-02-01 Thread Travis Oliphant
What is the attitude of this group about the ndarray growing some class methods? I'm thinking that we should have several. For example all the fromXXX functions should probably be classmethods ndarray.frombuffer ndarray.fromfile etc. -Travis ___

[Numpy-discussion] SciPy '07 ???

2007-02-01 Thread Christopher Barker
Hi, Does anyone know if there will be a SciPy '07 conference, and if so, when? I'd really like to try to get there this year, but need to start planning my summer schedule. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Louis Wicker
Robert: thanks - I appreciate the advice, and hopefully a) Leopard will get here in a few months, and b) that will fix this. cheers! Lou Wicker On Feb 1, 2007, at 3:11 PM, Robert Kern wrote: Louis Wicker wrote: Sebastian: that code helps a lot. A standard gcc (no flags) of that code

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Robert Kern
Louis Wicker wrote: > Sebastian: > > that code helps a lot. A standard gcc (no flags) of that code breaks, > but if you compile it with gcc -m64, you can address large memory spaces. > > So I will try and compile numpy with -m64 It won't work. Your Python is not compiled as a 64-bit program

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Louis Wicker
Sebastian: that code helps a lot. A standard gcc (no flags) of that code breaks, but if you compile it with gcc -m64, you can address large memory spaces. So I will try and compile numpy with -m64 Lou On Feb 1, 2007, at 2:01 PM, Sebastian Haase wrote: #include #include int main()

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Timothy Hochberg
On 2/1/07, Christopher Barker <[EMAIL PROTECTED]> wrote: Zachary Pincus wrote: > Say a function that (despite Tim's pretty > reasonable 'don't do that' warning) will return true when two arrays > have overlapping memory? I think it would be useful, even if it's not robust. I'd still like to kno

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Travis Oliphant
Christopher Barker wrote: >Zachary Pincus wrote: > > >>Say a function that (despite Tim's pretty >>reasonable 'don't do that' warning) will return true when two arrays >>have overlapping memory? >> >> > >I think it would be useful, even if it's not robust. I'd still like to >know if a g

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Christopher Barker
Zachary Pincus wrote: > Say a function that (despite Tim's pretty > reasonable 'don't do that' warning) will return true when two arrays > have overlapping memory? I think it would be useful, even if it's not robust. I'd still like to know if a given two arrays COULD share data. I suppose to

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Travis Oliphant
Zachary Pincus wrote: >>>A question, then: Does this represent a bug? Or perhaps there is a >>>better idiom for modifying an array in-place than 'a[:] = ...'? Or is >>>incumbent on the user to ensure that any time an array is directly >>>modified, that the modifying array is not a view of the orig

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Christopher Barker
Zachary Pincus wrote: >>> I recently was trying to write code to modify an array in-place (so >>> as not to invalidate any references to that array) >> I'm not sure what this means exactly. > > Say one wants to keep two different variables referencing a single in- > memory list, as so: > a = [1,2

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Sebastian Haase
Here is a small c program that we used more than a year ago to confirm that tiger is really doing a 64-bit malloc (on G5). #include #include int main() { size_t n; void *p; double gb; for(gb=10;gb>.3;gb-=.5) { n= 1024L * 1024L * 1024L * gb; p = malloc( n ); printf("%12

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Sebastian Haase
Here is a small c program that we used more than a year ago to confirm that tiger is really doing a 64-bit malloc (on G5). #include #include int main() { size_t n; void *p; double gb; for(gb=10;gb>.3;gb-=.5) { n= 1024L * 1024L * 1024L * gb; p = malloc( n ); printf(

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Zachary Pincus
>> A question, then: Does this represent a bug? Or perhaps there is a >> better idiom for modifying an array in-place than 'a[:] = ...'? Or is >> incumbent on the user to ensure that any time an array is directly >> modified, that the modifying array is not a view of the original >> array? >> >>

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Travis Oliphant
Louis Wicker wrote: > Travis: > > yes it does. Its the Woodcrest server chip > > which > supports 32 and 64 bit operations. For example the new Intel Fortran > compiler can grab more than 2 GB of memory (its a

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Louis Wicker
Thanks Robert thats kinda what I thought. Since Leopard is not far off, then by summer things will be fine, I hope... L On Feb 1, 2007, at 1:48 PM, Robert Kern wrote: Travis Oliphant wrote: Louis Wicker wrote: Dear list: I cannot seem to figure how to create arrays > 2 GB on a Mac Pro

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Louis Wicker
Travis: quick follow up: Mac Pro's currently have the dual-core 5100 Xeon (two processors, two cores each), the 5300 Xeon's (quad-core) are coming in a few weeks, we think. Lou On Feb 1, 2007, at 1:41 PM, Travis Oliphant wrote: Louis Wicker wrote: Dear list: I cannot seem to figure h

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Louis Wicker
Travis: yes it does. Its the Woodcrest server chip which supports 32 and 64 bit operations. For example the new Intel Fortran compiler can grab more than 2 GB of memory (its a beta10 version). I think gcc 4.x can as well. However, Tiger (OS X 10.4.x) is not completely 64 bit compliant

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Robert Kern
Travis Oliphant wrote: > Louis Wicker wrote: > >> Dear list: >> >> I cannot seem to figure how to create arrays > 2 GB on a Mac Pro >> (using Intel chip and Tiger, 4.8). I have hand compiled both Python >> 2.5 and numpy 1.0.1, and cannot make arrays bigger than 2 GB. I also >> run out of spac

Re: [Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Travis Oliphant
Louis Wicker wrote: > Dear list: > > I cannot seem to figure how to create arrays > 2 GB on a Mac Pro > (using Intel chip and Tiger, 4.8). I have hand compiled both Python > 2.5 and numpy 1.0.1, and cannot make arrays bigger than 2 GB. I also > run out of space if I try and 3-6 several arrays

Re: [Numpy-discussion] Cutting 1.0.2 release

2007-02-01 Thread Sven Schreiber
Travis Oliphant schrieb: > I think it's time for the 1.0.2 release of NumPy. > > What outstanding issues need to be resolved before we do it? > Hi, I just used real_if_close for the first time, and promptly discovered that it turns matrix input into array output: >>> import numpy as n >>> n._

[Numpy-discussion] large memory address space on Mac OS X (intel)

2007-02-01 Thread Louis Wicker
Dear list: I cannot seem to figure how to create arrays > 2 GB on a Mac Pro (using Intel chip and Tiger, 4.8). I have hand compiled both Python 2.5 and numpy 1.0.1, and cannot make arrays bigger than 2 GB. I also run out of space if I try and 3-6 several arrays of 1000 mb or so (the mem

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Travis Oliphant
Zachary Pincus wrote: >Hello folks, > >I recently was trying to write code to modify an array in-place (so >as not to invalidate any references to that array) via the standard >python idiom for lists, e.g.: > >a[:] = numpy.flipud(a) > >Now, flipud returns a view on 'a', so assigning that to 'a

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Timothy Hochberg
On 2/1/07, Zachary Pincus <[EMAIL PROTECTED]> wrote: [CHOP] I think that this is is unquestionably a bug It's not a bug. It's a design decision. It has certain consequences. Many good, some bad and some that just take some getting used to. -- isn't the point of views that the user shouldn't

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Zachary Pincus
> Zachary Pincus wrote: >> Hello folks, >> >> I recently was trying to write code to modify an array in-place (so >> as not to invalidate any references to that array) > > I'm not sure what this means exactly. Say one wants to keep two different variables referencing a single in- memory list, as

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Christopher Barker
Zachary Pincus wrote: > Hello folks, > > I recently was trying to write code to modify an array in-place (so > as not to invalidate any references to that array) I'm not sure what this means exactly. > via the standard > python idiom for lists, e.g.: > > a[:] = numpy.flipud(a) > > Now, fli

Re: [Numpy-discussion] problem with installation of numpy: undefined symbols

2007-02-01 Thread Robert Kern
Eric Emsellem wrote: > - I finally get the svn version of numpy, and do the "python setup.py > install" (no site.cfg ! but environment variables defined as mentioned > above) Show us the output of $ cd ~/src/numpy # or whereever $ python setup.py config Most likely, you are having the same

[Numpy-discussion] problem with installation of numpy: undefined symbols

2007-02-01 Thread Eric Emsellem
Hi, after trying to solve an installation problem with scipy, I had to reinstall everything from scratch, and so I now turned back to numpy the installation of which does not work for me (which may in fact explain the pb I had with scipy). To be clear on what I do: - I install blas first, and cr

Re: [Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Anne Archibald
On 01/02/07, Zachary Pincus <[EMAIL PROTECTED]> wrote: > I recently was trying to write code to modify an array in-place (so > as not to invalidate any references to that array) via the standard > python idiom for lists, e.g.: You can do this, but if your concern is invalidating references, you m

[Numpy-discussion] array copy-to-self and views

2007-02-01 Thread Zachary Pincus
Hello folks, I recently was trying to write code to modify an array in-place (so as not to invalidate any references to that array) via the standard python idiom for lists, e.g.: a[:] = numpy.flipud(a) Now, flipud returns a view on 'a', so assigning that to 'a[:]' provides pretty strange r