Re: [Numpy-discussion] possibly ctypes related segfault

2007-08-29 Thread Martin Wiechert
Hmpf. Anyway, thanks again, Stefan! Cheers, Martin On Tuesday 28 August 2007 18:45, Stefan van der Walt wrote: > On Tue, Aug 28, 2007 at 02:03:52PM +0200, Martin Wiechert wrote: > > Here's the test script. I'm using it via execfile from an interactive > > session, so I can inspect (and crash wit

[Numpy-discussion] Citing Numeric and numpy

2007-08-29 Thread Peter
Dear Travis and the Numerical Python community, I would like to know if there is a preferred form for citing the old "Numeric" library and more recent "numpy" libraries in a publication. I have checked the mailing list archives, but didn't find an answer. I am not aware of any publication for

Re: [Numpy-discussion] Citing Numeric and numpy

2007-08-29 Thread Ryan Krauss
Obviously this is mainly Travis' question to answer and it depends on the nature of the reference, but I would like to see Travis's article in the recent special issue on Python for scientific use in CiSE cited as well because I think it does a great job of presenting why Python should be taken ser

Re: [Numpy-discussion] Citing Numeric and numpy

2007-08-29 Thread Alan G Isaac
On Wed, 29 Aug 2007, Peter apparently wrote: > I would like to know if there is a preferred form for > citing the old > "Numeric" library I'll attach text from the first two pages of *Numerical Python* below. Cheers, Alan Isaac - An

[Numpy-discussion] Trac ticket

2007-08-29 Thread Joris De Ridder
Hi, Perhaps a stupid question, but I don't seem to find any info about it on the web. I would like to take up a (simple) Numpy Trac ticket, and fix it in the Numpy trunk. How can I assign the ticket to myself? After logging in, I don't see any obvious way of doing this. Secondly, committing

Re: [Numpy-discussion] Trac ticket

2007-08-29 Thread Steve Lianoglou
> Perhaps a stupid question, but I don't seem to find any info about it > on the web. > I would like to take up a (simple) Numpy Trac ticket, and fix it in > the Numpy trunk. How can I assign the ticket to myself? I'm not sure how the trac system is setup @ numpy, but you may not have the perms

[Numpy-discussion] Bug in resize method?

2007-08-29 Thread Charles R Harris
Hi all, This looks like a bug to me. >>> a = arange(6).reshape(2,3) >>> a.resize((3,3)) Traceback (most recent call last): File "", line 1, in ValueError: cannot resize this array: it does not own its data Is there any reason resize should fail in this case? Resize should be returning an new

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Stefan van der Walt
Hi Charles On Wed, Aug 29, 2007 at 09:42:50AM -0600, Charles R Harris wrote: > Hi all, > > This looks like a bug to me. > > >>> a = arange(6).reshape(2,3) > >>> a.resize((3,3)) > Traceback (most recent call last): > File "", line 1, in > ValueError: cannot resize this array: it does not own

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Charles R Harris
On 8/29/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > > Hi Charles > > On Wed, Aug 29, 2007 at 09:42:50AM -0600, Charles R Harris wrote: > > Hi all, > > > > This looks like a bug to me. > > > > >>> a = arange(6).reshape(2,3) > > >>> a.resize((3,3)) > > Traceback (most recent call last): > >

Re: [Numpy-discussion] linear algebra error?

2007-08-29 Thread Matthieu Brucher
> > > >>> from numpy import * > >>> from numpy.linalg import * > linalg is in the numpy module ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Christopher Barker
Charles R Harris wrote: > What *should* the resize method do? It looks like > it is equivalent to assigning a shape tuple to a.shape, No, that's what reshape does. > so why do we need it? resize() will change the SIZE of the array (number of elements), where reshape() will only change the sha

[Numpy-discussion] Trace returns int32 type for int8 array.

2007-08-29 Thread Charles R Harris
Hi all, The documentation of trace says it returns the same type as the array. Yet: >>> trace(eye(2, dtype=int8)).dtype dtype('int32') For float types this promotion does not occur >>> trace(eye(2, dtype=float32)).dtype dtype('float32') Trace operates the same way as sum. What should be the c

Re: [Numpy-discussion] linear algebra error?

2007-08-29 Thread Robert Kern
F Bitonti wrote: > However, I was told that the reason I am getting this error is because > the linear algebra module is already installed The more proximate reasonThat's not the reason why you are getting the error, it's just that you don't need to and shouldn't try to execute that setup.py sin

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Charles R Harris
On 8/29/07, Christopher Barker <[EMAIL PROTECTED]> wrote: > > Charles R Harris wrote: > > What *should* the resize method do? It looks like > > it is equivalent to assigning a shape tuple to a.shape, > > No, that's what reshape does. No, reshape returns a view and the view doesn't own its data. T

[Numpy-discussion] svn down

2007-08-29 Thread Charles R Harris
Hi all, The svn server seems to be down, I am getting error messages from the buildbots: svn: PROPFIND request failed on '/svn/numpy/trunk' svn: PROPFIND of '/svn/numpy/trunk': could not connect to server (http://scipy.org) program finished with exit code 1 It might be reasonable to check this c

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Timothy Hochberg
On 8/29/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > On 8/29/07, Christopher Barker <[EMAIL PROTECTED]> wrote: > > > > Charles R Harris wrote: > > > What *should* the resize method do? It looks like > > > it is equivalent to assigning a shape tuple to a.shape, > > > > No, that's what res

Re: [Numpy-discussion] svn down

2007-08-29 Thread Christopher Hanley
This could be a problem with the buildbots. I was just able to update from svn. Chris Charles R Harris wrote: > Hi all, > > The svn server seems to be down, I am getting error messages from the > buildbots: > > svn: PROPFIND request failed on '/svn/numpy/trunk' > svn: PROPFIND of '/svn/nump

Re: [Numpy-discussion] Finding unique rows in an array [Was: Finding a row match within a numpy array]

2007-08-29 Thread Mark.Miller
A belated thanks...but yes. That does the trick. I've not worked with views explicitly, so I appreciate the input. I definitely foresee additional applications of these types of things in the future. Thanks again, -Mark Francesc Altet wrote: > > You can always do a view of the rows as stri

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Anne Archibald
On 29/08/2007, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > The main inconsistency I see above is that resize appears to only require > ownership of the data if in fact the number of items changes. I don't think > that's actually a bug, but I don't like it much; I would prefer that resize > be st

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Charles R Harris
On 8/29/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > > > > On 8/29/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > > > > > On 8/29/07, Christopher Barker < [EMAIL PROTECTED]> wrote: > > > > > > Charles R Harris wrote: > > > > What *should* the resize method do? It looks like > > > > it

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Timothy Hochberg
On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > On 29/08/2007, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > > > The main inconsistency I see above is that resize appears to only > require > > ownership of the data if in fact the number of items changes. I don't > think > > that's actuall

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Robert Kern
Anne Archibald wrote: > On 29/08/2007, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > >> The main inconsistency I see above is that resize appears to only require >> ownership of the data if in fact the number of items changes. I don't think >> that's actually a bug, but I don't like it much; I wou

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Gael Varoquaux
On Wed, Aug 29, 2007 at 11:31:12AM -0700, Timothy Hochberg wrote: >FWIW, I don't use either the resize function or the resize method, but if >I was going to get rid of one, personally I'd axe the function. Resizing >is a confusing operation and the function doesn't have the possibility

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Timothy Hochberg
On 8/29/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > I still don't see why the method is needed at all. Given the conditions on > the array, the only thing it buys you over the resize function or a reshape > is the automatic deletion of the old memory if new memory is allocated. > Can you

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Charles R Harris
On 8/29/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > > > > On 8/29/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > > I still don't see why the method is needed at all. Given the conditions > > on the array, the only thing it buys you over the resize function or a > > reshape is the aut

Re: [Numpy-discussion] Bug in resize method?

2007-08-29 Thread Eric Firing
Timothy Hochberg wrote: > > > On 8/29/07, *Charles R Harris* <[EMAIL PROTECTED] > > wrote: > > > I still don't see why the method is needed at all. Given the > conditions on the array, the only thing it buys you over the resize > function or a reshape is t

Re: [Numpy-discussion] [SciPy-dev] NumPy 1.0.3.x and SciPy 0.5.2.x

2007-08-29 Thread Ivan Pan
On 8/19/07, Ondrej Certik <[EMAIL PROTECTED]> wrote: > I don't know what the native way of installing packages on Mac OS > X is, but I know of the fink project, that basically allows to use > debian packages: > > http://finkproject.org/ Besides fink, there is also MacPort

[Numpy-discussion] help! not using lapack

2007-08-29 Thread Mathew Yeates
Hi When I try import numpy id(numpy.dot) == id(numpy.core.multiarray.dot) I get True. But I have liblapck.a installed in ~/lib and I put the lines [DEFAULT] library_dirs = /home/myeates/lib include_dirs = /home/myeates/include in site.cfg In fact, when I build and run a sytem trace I see that lib

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Robert Kern
Mathew Yeates wrote: > Hi > When I try > import numpy > id(numpy.dot) == id(numpy.core.multiarray.dot) > > I get True. But I have liblapck.a installed in ~/lib and I put the lines > [DEFAULT] > library_dirs = /home/myeates/lib > include_dirs = /home/myeates/include > > in site.cfg > In fact, when

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Mathew Yeates
yes, I get from numpy.core import _dotblas ImportError: No module named multiarray Now what? uname -a Linux 2.6.9-55.0.2.EL #1 Tue Jun 12 17:47:10 EDT 2007 i686 athlon i386 GNU/Linux Robert Kern wrote: > Mathew Yeates wrote: > >> Hi >> When I try >> import numpy >> id(numpy.dot) == id(numpy.

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Robert Kern
Mathew Yeates wrote: > yes, I get > from numpy.core import _dotblas > ImportError: No module named multiarray That's just weird. Can you import numpy.core.multiarray by itself? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Mathew Yeates
yes Robert Kern wrote: > Mathew Yeates wrote: > >> yes, I get >> from numpy.core import _dotblas >> ImportError: No module named multiarray >> > > That's just weird. Can you import numpy.core.multiarray by itself? > > ___ Numpy-discussion ma

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Mathew Yeates
oops. sorry from numpy.core import _dotblas ImportError: /home/myeates/lib/python2.5/site-packages/numpy/core/_dotblas.so: undefined symbol: cblas_zaxpy Robert Kern wrote: > Mathew Yeates wrote: > >> yes, I get >> from numpy.core import _dotblas >> ImportError: No module named multiarray >>

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Robert Kern
Mathew Yeates wrote: > oops. sorry > from numpy.core import _dotblas > ImportError: > /home/myeates/lib/python2.5/site-packages/numpy/core/_dotblas.so: > undefined symbol: cblas_zaxpy Okay, yes, that's the problem. liblapack depends on libblas. Make sure that you specify one to use. Follow the d

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Mathew Yeates
my site,cfg just is [DEFAULT] library_dirs = /home/myeates/lib include_dirs = /home/myeates/include python setup.py config gives F2PY Version 2_3979 blas_opt_info: blas_mkl_info: libraries mkl,vml,guide not found in /home/myeates/lib NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLA

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Mathew Yeates
more info. My blas library has zaxpy defined but not cblas_zaxpy Mathew Yeates wrote: > my site,cfg just is > [DEFAULT] > library_dirs = /home/myeates/lib > include_dirs = /home/myeates/include > > python setup.py config gives > F2PY Version 2_3979 > blas_opt_info: > blas_mkl_info: > libraries

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Robert Kern
If your BLAS just the reference BLAS, don't bother with _dotblas. It won't be any faster than the default implementation in numpy. You only get a win if you are using an accelerated BLAS with the CBLAS interface for C-style row-major matrices. Your libblas does not seem to be such an accelerated BL

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Mathew Yeates
I'm the one who created libblas.a so I must have done something wrong. This is lapack-3.1.1. Robert Kern wrote: > If your BLAS just the reference BLAS, don't bother with _dotblas. It won't be > any faster than the default implementation in numpy. You only get a win if you > are using an accelera

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Robert Kern
Mathew Yeates wrote: > I'm the one who created libblas.a so I must have done something wrong. > This is lapack-3.1.1. No, you didn't do anything wrong, per se, you just built the reference F77 BLAS. It's not an accelerated BLAS, so there's no point in using it with numpy. There's not way you *can

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Mathew Yeates
Thanks Robert I have a deadline and don't have time to install ATLAS. Instead I'm installing clapack. Is this the corrrect thing to do? Mathew Robert Kern wrote: > Mathew Yeates wrote: > >> I'm the one who created libblas.a so I must have done something wrong. >> This is lapack-3.1.1. >>

Re: [Numpy-discussion] Trac ticket

2007-08-29 Thread Joris De Ridder
> You should most likely just attach a patch against the latest trunk > to the ticket itself for review. Done. The patch adds an 'axis' keyword to median(). J. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ Numpy-discussion mailing

Re: [Numpy-discussion] help! not using lapack

2007-08-29 Thread Robert Kern
Mathew Yeates wrote: > Thanks Robert > I have a deadline and don't have time to install ATLAS. Instead I'm > installing clapack. Is this the corrrect thing to do? No. Just leave things alone if you don't have an accelerated BLAS at hand. -- Robert Kern "I have come to believe that the whole wo

Re: [Numpy-discussion] [SciPy-dev] NumPy 1.0.3.x and SciPy 0.5.2.x

2007-08-29 Thread Christopher Barker
Ivan Pan wrote: > On 8/19/07, Ondrej Certik <[EMAIL PROTECTED]> wrote: >> I don't know what the native way of installing packages on Mac OS >> X is Boy, I wish this weren't such a mess. Quite some time ago, a bunch of us on the pythonmac list tried to establish the idea of a "one 'standard' pyt

[Numpy-discussion] gesdd hangs

2007-08-29 Thread Mathew Yeates
I guess I can't blame lapack. My system has atlas so I recompiled numpy pointing to atlas. Now id(numpy.dot) == id(numpy.core.multiarray.dot) is False However when I run decomp.svd on a 25 by 25 identity matrix, it hangs when gesdd is called (line 501 of linalag/decomp.py) Anybody else seeing

[Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Anne Archibald
Hi, numpy's Fourier transforms have the handy feature of being able to upsample and downsample signals; for example the documentation cites irfft(rfft(A),16*len(A)) as a way to get a Fourier interpolation of A. However, there is a peculiarity with the way numpy handles the highest-frequency coeffi

Re: [Numpy-discussion] gesdd hangs

2007-08-29 Thread Charles R Harris
On 8/29/07, Mathew Yeates <[EMAIL PROTECTED]> wrote: > > I guess I can't blame lapack. My system has atlas so I recompiled numpy > pointing to atlas. Now > > id(numpy.dot) == id(numpy.core.multiarray.dot) is False > > However when I run decomp.svd on a 25 by 25 identity matrix, it hangs when > gesd

Re: [Numpy-discussion] gesdd hangs

2007-08-29 Thread Mathew Yeates
never returns Charles R Harris wrote: > > > On 8/29/07, *Mathew Yeates* <[EMAIL PROTECTED] > > wrote: > > I guess I can't blame lapack. My system has atlas so I recompiled > numpy > pointing to atlas. Now > > id(numpy.dot) == id(numpy.core.multiarray.dot

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Charles R Harris
Anne, On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > Hi, > > numpy's Fourier transforms have the handy feature of being able to > upsample and downsample signals; for example the documentation cites > irfft(rfft(A),16*len(A)) as a way to get a Fourier interpolation of A. > However, ther

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Charles R Harris
On 8/29/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > Anne, > > On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > numpy's Fourier transforms have the handy feature of being able to > > upsample and downsample signals; for example the documentation cites > > irfft(rfft(

Re: [Numpy-discussion] gesdd hangs

2007-08-29 Thread Charles R Harris
On 8/29/07, Mathew Yeates <[EMAIL PROTECTED]> wrote: > > never returns Where is decomp coming from? linalg.svd(eye(25)) works fine here. Chuck ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] gesdd hangs

2007-08-29 Thread Robert Kern
Charles R Harris wrote: > > On 8/29/07, *Mathew Yeates* <[EMAIL PROTECTED] > > wrote: > > never returns > > Where is decomp coming from? linalg.svd(eye(25)) works fine here. scipy, most likely. -- Robert Kern "I have come to believe that the whole world is an en

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Anne Archibald
On 29/08/2007, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > What is going on is that the coefficient at the Nyquist frequency appears > once in the unextended array, but twice when the array is extended with > zeros because of the Hermitean symmetry. That should probably be fixed in > the ups

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Charles R Harris
Hi Anne, On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > On 29/08/2007, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > > What is going on is that the coefficient at the Nyquist frequency > appears > > once in the unextended array, but twice when the array is extended with > > zeros

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Anne Archibald
On 29/08/2007, Charles R Harris <[EMAIL PROTECTED]> wrote: > > Is this also appropriate for the other FFTs? (inverse real, complex, > > hermitian, what have you) I have written a quick hack (attached) that > > should do just that rescaling, but I don't know that it's a good idea, > > as implemente

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Charles R Harris
On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > On 29/08/2007, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > Is this also appropriate for the other FFTs? (inverse real, complex, > > > hermitian, what have you) I have written a quick hack (attached) that > > > should do just that res