Re: [Numpy-discussion] determining if you have ATLAS or not

2006-07-12 Thread Bill Baxter
Terrific.  Nils sent me the answer:scipy.show_config() ornumpy.show_config ()will give you some useful information.And here it goes straight to the wikihttp://www.scipy.org/Installing_SciPy/Windows --bb - Using Tomcat but nee

[Numpy-discussion] determining if you have ATLAS or not

2006-07-12 Thread Bill Baxter
How can you probe numpy for info about what sort of BLAS/LAPACK you have, or other build configuration info?Searching the ml archives I turned up this one hint from Travis, which can be embodied in code thusly:     import numpy    def have_blas():         return id(numpy.dot) != id(numpy.core.multi

[Numpy-discussion] prebuild windows - was: Re: Building SciPy under Windows attn. Bill Baxter

2006-07-12 Thread Sebastian Haase
Hi, The latest cygwin gcc seems to be version 3.4.4. Are (relatively) new SVN builds (both numpy and scipy) available somewhere for download ? (I would like to experience the new "arr.T" feature ;-) ) Thanks Sebastian Haase Bill Baxter wrote: > Thanks, that seems to have done the trick! > I've

Re: [Numpy-discussion] Building SciPy under Windows attn. Bill Baxter

2006-07-12 Thread Bill Baxter
Thanks, that seems to have done the trick!I've got a SVN Scipy now!I updated the building scipy wiki page with this piece of advice.--bbOn 7/13/06, John Carter <[EMAIL PROTECTED]> wrote: I had problems building SciPy and NumPy under Windows. They went awaywhen I stopped using the stable version of

Re: [Numpy-discussion] numpy distutils problem on Windows

2006-07-12 Thread David M. Cooke
On Thu, 13 Jul 2006 11:29:46 +0900 "Bill Baxter" <[EMAIL PROTECTED]> wrote: > In numpy/distutils/command/config.py: > 'cookedm' added a get_output() command on June 9. > This get_output function uses os.WEXITSTATUS and various other > os.W*functions. > > These do not exist in Python on Windows. >

[Numpy-discussion] numpy distutils problem on Windows

2006-07-12 Thread Bill Baxter
In numpy/distutils/command/config.py:'cookedm' added a get_output() command on June 9.This get_output function uses os.WEXITSTATUS and various other os.W* functions.These do not exist in Python on Windows. Is there some other way to achieve the same thing without those?For now, just commenting out

Re: [Numpy-discussion] Args for rand and randn: call for a vote

2006-07-12 Thread Robert Kern
Sasha wrote: > Let me repeat my suggestion that was lost in this long thread: > > Add rands(shape, dtype=float, min=default_min(dtype), max=default_max(dtype)) > to the top level. Suitable defaults can be discussed. A more flexible > variation could > be rands(shape, dtype=float, algorithm=defaul

[Numpy-discussion] Patch against Image.py in the PIL

2006-07-12 Thread Travis Oliphant
Attached is a patch that makes PIL Image objects both export and consume the array interface. -Travis Index: PIL/Image.py === --- PIL/Image.py(revision 358) +++ PIL/Image.py(working copy) @@ -187,6 +187,42 @@ }

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Mark Heslep
Albert Strasheim wrote: > Hello all > > Various people wrote: > >>> Im curious though: the several projects recently using ctypes >>> and numpy to wrap libraries (Pygame SDL, OpenGL, svm) must have come >>> across the issue of using a creating a numpy array from a ctypes >>> pointer. Ill have

Re: [Numpy-discussion] how to use argsort result?

2006-07-12 Thread Victoria G. Laidler
Hi, Pardon me if I'm reprising an earlier discussion, as I'm new to the list. But is there a reason that this obscure syntax A[arange(2)[:,newaxis],indexes] A[arange(A.shape[0])[:,newaxis],indexes] is preferable to the intuitively reasonable thing that the Original Poster did? A[indexes]

Re: [Numpy-discussion] Args for rand and randn: call for a vote

2006-07-12 Thread Sasha
On 7/12/06, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Wed, 12 Jul 2006, Sasha apparently wrote: [snip] > > Add rands(shape, dtype=float, min=default_min(dtype), > > max=default_max(dtype)) > > to the top level. Suitable defaults can be discussed. A more flexible > > variation could > > be rand

Re: [Numpy-discussion] Args for rand and randn: call for a vote

2006-07-12 Thread Alan G Isaac
On Wed, 12 Jul 2006, Sasha apparently wrote: > Let me repeat my suggestion that was lost in this long thread: > Add rands(shape, dtype=float, min=default_min(dtype), max=default_max(dtype)) > to the top level. Suitable defaults can be discussed. A more flexible > variation could > be rands(sh

Re: [Numpy-discussion] [SciPy-dev] Weave, numpy, external libraries and conflicting typedefs

2006-07-12 Thread Prabhu Ramachandran
I sent this reply on 9th but the message seems to have never made it to scipy-dev and is still pending moderator approval on numpy-discussion. I had attached a patch for weave that made the email larger than 40 KB. I don't have checkin privileges to scipy/numpy. So if someone would be kind enou

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Albert Strasheim
Hello all Various people wrote: > > Im curious though: the several projects recently using ctypes > > and numpy to wrap libraries (Pygame SDL, OpenGL, svm) must have come > > across the issue of using a creating a numpy array from a ctypes > > pointer. Ill have to look further. > > > It depends

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Travis Oliphant
Mark Heslep wrote: > Travis Oliphant wrote: > >> The problem here is that from Python NumPy has no way to create an >> ndarray from a pointer. Doing this creates a situtation where it is >> unclear who owns the memory. It is probably best to wrap the pointer >> into some kind of object exp

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Mark Heslep
Travis Oliphant wrote: > The problem here is that from Python NumPy has no way to create an > ndarray from a pointer. Doing this creates a situtation where it is > unclear who owns the memory. It is probably best to wrap the pointer > into some kind of object exposing the buffer protocol and

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Travis Oliphant
Mark Heslep wrote: > Travis Oliphant wrote: > >> Mark Heslep wrote: >> >>> I don't see a clean way to create a numpy array from a ctypes pointer >>> object. Is the __array_interface_ in ctypes the thing thats missing >>> needed to make this happen? I've followed Albert's Scipy cookbook

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Travis Oliphant
Mark Heslep wrote: > I don't see a clean way to create a numpy array from a ctypes pointer object. > Is the __array_interface_ in ctypes the thing thats missing needed to make > this happen? I've followed Albert's Scipy cookbook on ctypes here > > http://www.scipy.org/Cookbook/Ctypes <-- getti

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Thomas Heller
Mark Heslep schrieb: > Travis Oliphant wrote: >> Mark Heslep wrote: >>> I don't see a clean way to create a numpy array from a ctypes pointer >>> object. Is the __array_interface_ in ctypes the thing thats missing >>> needed to make this happen? I've followed Albert's Scipy cookbook >>> on cty

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Mark Heslep
Travis Oliphant wrote: > Mark Heslep wrote: >> I don't see a clean way to create a numpy array from a ctypes pointer >> object. Is the __array_interface_ in ctypes the thing thats missing >> needed to make this happen? I've followed Albert's Scipy cookbook >> on ctypes here >> >> On the C side

Re: [Numpy-discussion] Args for rand and randn: call for a vote

2006-07-12 Thread Sasha
Let me repeat my suggestion that was lost in this long thread: Add rands(shape, dtype=float, min=default_min(dtype), max=default_max(dtype)) to the top level. Suitable defaults can be discussed. A more flexible variation could be rands(shape, dtype=float, algorithm=default_algorithm(dtype)), but

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Travis Oliphant
Mark Heslep wrote: > I don't see a clean way to create a numpy array from a ctypes pointer object. > Is the __array_interface_ in ctypes the thing thats missing needed to make > this happen? I've followed Albert's Scipy cookbook on ctypes here > > On the C side the PyArray_SimpleNewFromData( ..

[Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Mark Heslep
I don't see a clean way to create a numpy array from a ctypes pointer object. Is the __array_interface_ in ctypes the thing thats missing needed to make this happen? I've followed Albert's Scipy cookbook on ctypes here http://www.scipy.org/Cookbook/Ctypes <-- getting dated now for numpy SVN b

[Numpy-discussion] Building SciPy under Windows attn. Bill Baxter

2006-07-12 Thread John Carter
I had problems building SciPy and NumPy under Windows. They went away when I stopped using the stable version of gcc and used 3.4.5 I think the problem was related to differences in cygwin and mingw32. SciPy built and everything I've needed works but the self test fails. John Dr. John N. Carte

Re: [Numpy-discussion] Array interface and builtin array.array example

2006-07-12 Thread Karol Langner
On Wednesday 12 July 2006 16:00, Thomas Heller wrote: > Karol Langner schrieb: > > On Wednesday 12 July 2006 13:29, Thomas Heller wrote: > >> Sasha schrieb: > >> > I had similar hopes when I submited the array interface patch > >> >

Re: [Numpy-discussion] Array interface and builtin array.array example

2006-07-12 Thread Thomas Heller
Karol Langner schrieb: > On Wednesday 12 July 2006 13:29, Thomas Heller wrote: >> Sasha schrieb: >> > I had similar hopes when I submited the array interface patch >> > > >id=5470&atid=305470> and announced it on python-dev

Re: [Numpy-discussion] Array interface and builtin array.array example

2006-07-12 Thread Karol Langner
On Wednesday 12 July 2006 13:29, Thomas Heller wrote: > Sasha schrieb: > > I had similar hopes when I submited the array interface patch > > >id=5470&atid=305470> and announced it on python-dev > >

Re: [Numpy-discussion] Args for rand and randn: call for a vote

2006-07-12 Thread Alan G Isaac
Robert makes his case clearly and persuasively. Without pretending to challenge his argument in any way, I would just like to clarify what is at issue for some of the teaching crowd (or for me in any case). - Get up and running very quickly even with students who lack a programming background.

Re: [Numpy-discussion] Array interface and builtin array.array example

2006-07-12 Thread Thomas Heller
Sasha schrieb: > I had similar hopes when I submited the array interface patch > > and announced it on python-dev > . > > I am still waiti

Re: [Numpy-discussion] "ImportError: No module named numeric"

2006-07-12 Thread Stefan van der Walt
Hi Tamaryn On Wed, Jul 12, 2006 at 11:57:48AM +0100, Tamaryn Menneer wrote: > Hi > > I'm running Python 2.4 on Windows XP. I've installed NumPy, and run the > simple test of "import numeric" but I get the error "ImportError: No module > named numeric" in return. The module numeric is located in

Re: [Numpy-discussion] "ImportError: No module named numeric"

2006-07-12 Thread Sven Schreiber
Tamaryn Menneer schrieb: > Hi > > I'm running Python 2.4 on Windows XP. I've installed NumPy, and run the > simple test of "import numeric" but I get the error "ImportError: No module > named numeric" in return. The module numeric is located in > C:\Python24\Lib\site-packages\numpy\core, but even

[Numpy-discussion] "ImportError: No module named numeric"

2006-07-12 Thread Tamaryn Menneer
Hi I'm running Python 2.4 on Windows XP. I've installed NumPy, and run the simple test of "import numeric" but I get the error "ImportError: No module named numeric" in return. The module numeric is located in C:\Python24\Lib\site-packages\numpy\core, but even when I set PYTHONPATH to this it ret

Re: [Numpy-discussion] Args for rand and randn, and workarounds

2006-07-12 Thread Sven Schreiber
Travis Oliphant schrieb: > > Because of this. I've removed the global_namespace functions (fft, > ifft, rand, and randn) from numpy. They are *no longer* in the > top-level name-space. If you want them, setup a startup-file > appropriately. > Ok I'm glad that's settled; however, do I und

Re: [Numpy-discussion] suggestions for Matrix-related changes

2006-07-12 Thread Sven Schreiber
JJ schrieb: > Travis Oliphant ee.byu.edu> writes: > >> Svd returns matrices now. Except for the list of singular values >> which is still an array. Do you want a 1xn matrix instead of an >> array? Although I'm a matrix supporter, I'm not sure here. Afaics the pro argument is to have *everyt

Re: [Numpy-discussion] Args for rand and randn, and workarounds

2006-07-12 Thread Stefan van der Walt
On Wed, Jul 12, 2006 at 05:47:15PM +0900, Bill Baxter wrote: > On 7/12/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > > Because of this. I've removed the global_namespace functions (fft, > ifft, rand, and randn) from numpy. They are *no longer* in the > top-level name-space. I

Re: [Numpy-discussion] Args for rand and randn, and workarounds

2006-07-12 Thread Bill Baxter
On 7/12/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: Because of this.  I've removed the global_namespace functions (fft,ifft, rand, and randn) from numpy.  They are *no longer* in thetop-level name-space.   If you want them, setup a startup-fileappropriately. Any hints as to where we can find the

Re: [Numpy-discussion] Testing a self-compiled numpy

2006-07-12 Thread Bill Baxter
On 7/10/06, Bryce Hendrix <[EMAIL PROTECTED]> wrote: Keith Goodman wrote: Doesn't --prefix=/install/numpy/here/ work on windows? For our Windows Enthon project, the build command is setup.py config --compiler=mingw32 build --compiler=mingw32 install --prefix=path_to_whe

Re: [Numpy-discussion] suggestions for Matrix-related changes

2006-07-12 Thread Johannes Loehnert
On Wednesday 12 July 2006 02:07, Michael Sorich wrote: > On 7/12/06, JJ <[EMAIL PROTECTED]> wrote: > > 2) It would be very convienient to have some simple way to delete > > selected columns of a matrix. For example, in matlab the command is > > X[:,[3,5,7]]=[] to delete the three selected columns.