Re: [Numpy-discussion] Efficient numpy slicing for a "sliding window approach".

2009-02-20 Thread Nicolas Pinto
Thanks Josef. I'm not sure how I could use correlate2d because of the 'stride' parameter on the y and x axes, but I may be able to do something on the z axis. On Sat, Feb 21, 2009 at 12:56 AM, wrote: > On Sat, Feb 21, 2009 at 12:36 AM, Nicolas Pinto wrote: > > Thanks a lot for the pointer to s

Re: [Numpy-discussion] Efficient numpy slicing for a "sliding window approach".

2009-02-20 Thread josef . pktd
On Sat, Feb 21, 2009 at 12:36 AM, Nicolas Pinto wrote: > Thanks a lot for the pointer to segmentaxis. I'm trying to use it "as is" > and it seems that I need to a big reshape before the matrix multiplication. > Am I missing something ? > > > > > import nump

Re: [Numpy-discussion] Efficient numpy slicing for a "sliding window approach".

2009-02-20 Thread Nicolas Pinto
Thanks a lot for the pointer to segmentaxis. I'm trying to use it "as is" and it seems that I need to a big reshape before the matrix multiplication. Am I missing something ? import numpy as np from numpy import dot, transpose arrh, arrw, arrd = 480,640,

Re: [Numpy-discussion] Efficient numpy slicing for a "sliding window approach".

2009-02-20 Thread David Cournapeau
On Sat, Feb 21, 2009 at 1:46 PM, Nicolas Pinto wrote: > Dear all, > > I'm trying to optimize the code below and I was wondering if there is an > efficient method that could reduce the numpy slicing overheard without going > with cython. Is there anyway I could use mgrid to get a matrix with all my

[Numpy-discussion] Efficient numpy slicing for a "sliding window approach".

2009-02-20 Thread Nicolas Pinto
Dear all, I'm trying to optimize the code below and I was wondering if there is an efficient method that could reduce the numpy slicing overheard without going with cython. Is there anyway I could use mgrid to get a matrix with all my "windows" and then do a large matrix multiply instead? Any ide

Re: [Numpy-discussion] [Nipy-devel] Sphinx custom extension mess, and patches

2009-02-20 Thread Fernando Perez
On Mon, Feb 16, 2009 at 3:21 PM, Gael Varoquaux wrote: > I am not blaming anyone, just pointing out a non ideal situation. It has > already improved a lot with the matplotlib guys and the scipy guys > merging some changes in extensions and publishing the extensions in an > importable part of thei

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Warde-Farley
On 20-Feb-09, at 10:39 AM, Robert Kern wrote: >> Fiddling around I've found other blas/lapack >> functions where the same arg is offered but the choice actually does >> something. > > Examples? An even better example is scipy.linalg.fblas.dgemv, the matrix-vector equivalent of dgemm. overwrite_

Re: [Numpy-discussion] Multiple draw text or paste image using numpy

2009-02-20 Thread Robert Kern
On Fri, Feb 20, 2009 at 15:21, Frank Peacock wrote: > Hello > > I am familiar with the fromarray function in the pil library Image module to > plot pixels. Is it possible to do the same for drawtext for text or paste > for images without looping with lists? No. -- Robert Kern "I have come to b

[Numpy-discussion] Multiple draw text or paste image using numpy

2009-02-20 Thread Frank Peacock
Hello I am familiar with the fromarray function in the pil library Image module to plot pixels. Is it possible to do the same for drawtext for text or paste for images without looping with lists? Thanks Frank ___ Numpy-discussion mailing list

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Warde-Farley
On 20-Feb-09, at 10:39 AM, Robert Kern wrote: >> Fiddling around I've found other blas/lapack >> functions where the same arg is offered but the choice actually does >> something. > > Examples? scipy.lib.lapack.flapack.dpotri, for example. I'm not sure of the proper usage, but when I pass it an

[Numpy-discussion] Problem looping over numpy array in C

2009-02-20 Thread Sumant S.R. Oemrawsingh
Hi guys, I have a problem with looping over numpy arrays in C. I modify the array in-place (and return None), but after modification, the array doesn't seem to play nice any more. Below, I have the C code for a function do_something (a stripped version of my original function), which has as argum

[Numpy-discussion] inplace dot products (Robert Kern) (Re: Numpy-discussion Digest, Vol 29, Issue 69)

2009-02-20 Thread David Henderson
Hello all, I've been toying with the idea of an extended precision accumulator for the dot product written in numpy/core/src/multiarraymodule.c Once the modification is being performed, there is no reason not to allow the specification of an output array. The functions that exist now: Th

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread Robert Kern
On Fri, Feb 20, 2009 at 05:18, David Warde-Farley wrote: > Hi Olivier, > > There was this idea posted on the Scipy-user list a while back: > >http://projects.scipy.org/pipermail/scipy-user/2008-August/017954.html > > but it doesn't look like he got anywhere with it, or even got a > respons

Re: [Numpy-discussion] Initialize numpy array with other numpy arrays

2009-02-20 Thread Robert Kern
On Fri, Feb 20, 2009 at 02:22, Fabrice Silva wrote: >> On Thu, Feb 19, 2009 at 17:03, Frank Peacock wrote: >> > img[ngridn,ngride]=(ncolour[0],ncolour[1],ncolour[2]) > > Le jeudi 19 février 2009 à 18:24 -0600, Robert Kern a écrit : >> for i in range(3): >> img[ngridn,ngride,i] = ncolour[i] >

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread Robert Kern
On Fri, Feb 20, 2009 at 06:25, David Warde-Farley wrote: > > On 20-Feb-09, at 6:39 AM, David Cournapeau wrote: > >> You can just use ctypes to access ATLAS, as you would do for any >> library. Or do you mean something else ? > > Say, David... :) > > Do you have any idea why the pyf wrapper for fbl

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Warde-Farley
On 20-Feb-09, at 6:39 AM, David Cournapeau wrote: > You can just use ctypes to access ATLAS, as you would do for any > library. Or do you mean something else ? Say, David... :) Do you have any idea why the pyf wrapper for fblas3 completely ignores the overwrite_c argument? Fiddling around I'v

Re: [Numpy-discussion] Build with MKL on linux

2009-02-20 Thread Gregor Thalhammer
Neal Becker schrieb: > Trying to build numpy-1.2.1 with intel mkl 10.1.1.019 on linux F10 x86_64. > > echo $LD_LIBRARY_PATH > /opt/intel/mkl/10.1.1.019/lib/em64t > > > strace -e trace=file python -c 'import numpy; numpy.test()' 2>stuff > Running unit tests for numpy > NumPy version 1.2.1 > NumPy is

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Cournapeau
Olivier Grisel wrote: > 2009/2/20 David Warde-Farley : > >> Hi Olivier, >> >> There was this idea posted on the Scipy-user list a while back: >> >>http://projects.scipy.org/pipermail/scipy-user/2008-August/017954.html >> >> but it doesn't look like he got anywhere with it, or even got a

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread Olivier Grisel
2009/2/20 David Warde-Farley : > Hi Olivier, > > There was this idea posted on the Scipy-user list a while back: > >        http://projects.scipy.org/pipermail/scipy-user/2008-August/017954.html > > but it doesn't look like he got anywhere with it, or even got a > response. > > I just tried it and

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Warde-Farley
Hi Olivier, There was this idea posted on the Scipy-user list a while back: http://projects.scipy.org/pipermail/scipy-user/2008-August/017954.html but it doesn't look like he got anywhere with it, or even got a response. I just tried it and I observe the same behaviour. A quick look a

Re: [Numpy-discussion] Update webpage for python requirements for Numpy/SciPy

2009-02-20 Thread Scott Sinclair
> 2009/2/20 Pauli Virtanen : > Fri, 20 Feb 2009 08:34:06 +0200, Scott Sinclair wrote: > [clip] >> If someone can add a stub to the docs in SVN (patch attached for Numpy), >> I'm prepared to work on this. I can't see how to add pages in the >> doc-wiki... > > You can do also this in the doc-wiki, ju

Re: [Numpy-discussion] Initialize numpy array with other numpy arrays

2009-02-20 Thread Fabrice Silva
> On Thu, Feb 19, 2009 at 17:03, Frank Peacock wrote: > > img[ngridn,ngride]=(ncolour[0],ncolour[1],ncolour[2]) Le jeudi 19 février 2009 à 18:24 -0600, Robert Kern a écrit : > for i in range(3): > img[ngridn,ngride,i] = ncolour[i] Is it not possible to simply use img[ngridn, ngride,

Re: [Numpy-discussion] Update webpage for python requirements for Numpy/SciPy

2009-02-20 Thread Pauli Virtanen
Fri, 20 Feb 2009 08:34:06 +0200, Scott Sinclair wrote: [clip] > If someone can add a stub to the docs in SVN (patch attached for Numpy), > I'm prepared to work on this. I can't see how to add pages in the > doc-wiki... You can do also this in the doc-wiki, just use the "New item" form: ht

Re: [Numpy-discussion] Core math library in numpy

2009-02-20 Thread Pauli Virtanen
Fri, 20 Feb 2009 01:05:03 +0900, David Cournapeau wrote: [clip] >> I think they should be. Then we could easily use C99 complex math >> functions on plaforms on which they are available (and so get the >> "correct" corner-case semantics for free on these platforms). > > maybe we could change the n