Re: [Numpy-discussion] Problem with numpy.linalg.eig?

2007-11-12 Thread Geoffrey Zhu
On Nov 12, 2007 10:26 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > Geoffrey Zhu wrote: > > On Nov 12, 2007 12:37 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > >> On Nov 12, 2007 10:10 AM, Peter Creasey <[EMAIL PROTECTED]> wrote: > >>> The following code calling numpy v1.0.4 fails to terminate

[Numpy-discussion] I removed some duplicate code from weave

2007-11-12 Thread Jarrod Millman
Hey, I just noticed that dumb_shelve.py and dumbdbm_patched.py were in both scipy.io and scipy.weave. Since I assume that this was just an oversight, I went ahead and cleaned it up. First, I made sure that the newest code was in scipy.io: http://projects.scipy.org/scipy/scipy/changeset/3521

Re: [Numpy-discussion] Merging new (optional) build system in the trunk ?

2007-11-12 Thread David Cournapeau
Travis E. Oliphant wrote: > David Cournapeau wrote: >> Hi, >> >> I would appreciate to get some comment on whether there is any >> chance to get my numpy.scons branch merge into the trunk at some near >> future. I feel to have reached the point where the only big thing >> missing is more tes

Re: [Numpy-discussion] Merging new (optional) build system in the trunk ?

2007-11-12 Thread Travis E. Oliphant
David Cournapeau wrote: > Hi, > > I would appreciate to get some comment on whether there is any > chance to get my numpy.scons branch merge into the trunk at some near > future. I feel to have reached the point where the only big thing > missing is more testing. I tried to test it on many p

[Numpy-discussion] f2py cannot find gfortran compiler on OSX 10.5

2007-11-12 Thread Chris
I've just upgraded my OSX system to Leopard, and have successfully build numpy from scratch. I am trying to build some code, which includes f2py extensions, that build successfully on 10.4. I have the gfortran compiler installed, and am building my code using: python setup.py config_fc --fcompi

Re: [Numpy-discussion] Problem with numpy.linalg.eig?

2007-11-12 Thread David Cournapeau
Geoffrey Zhu wrote: > On Nov 12, 2007 12:37 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: >> On Nov 12, 2007 10:10 AM, Peter Creasey <[EMAIL PROTECTED]> wrote: >>> The following code calling numpy v1.0.4 fails to terminate on my machine, >>> which was not the case with v1.0.3.1 >>> >>> from nump

Re: [Numpy-discussion] how to convert btw rgb and pixel value

2007-11-12 Thread Stefan van der Walt
Since PIL Images now have array interfaces, it has become a lot simpler. The following should do the job: from numpy import array from PIL import Image def imread(fname,flatten=False): """Return a copy of a PIL image as a numpy array. *Parameters*: im : PIL image In

Re: [Numpy-discussion] Problem with numpy.linalg.eig?

2007-11-12 Thread Geoffrey Zhu
On Nov 12, 2007 12:37 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > > On Nov 12, 2007 10:10 AM, Peter Creasey <[EMAIL PROTECTED]> wrote: > > The following code calling numpy v1.0.4 fails to terminate on my machine, > > which was not the case with v1.0.3.1 > > > > from numpy import arange, floa

Re: [Numpy-discussion] numpy-1.0.5.dev4445.egg-info

2007-11-12 Thread Matthieu Brucher
It allows the check on egg dependencies IIRC Matthieu 2007/11/12, Keith Goodman <[EMAIL PROTECTED]>: > > I noticed that > > python setup.py install --prefix=/usr/local > > installs a new file called numpy-1.0.5.dev4445.egg-info. It used to be > that files were only installed in > /usr/local/lib/p

[Numpy-discussion] numpy-1.0.5.dev4445.egg-info

2007-11-12 Thread Keith Goodman
I noticed that python setup.py install --prefix=/usr/local installs a new file called numpy-1.0.5.dev4445.egg-info. It used to be that files were only installed in /usr/local/lib/python2.4/site-packages/numpy. What is the file used for? $ cat /usr/local/lib/python2.4/site-packages/numpy-1.0.5.d

Re: [Numpy-discussion] Getting an array interface and using it

2007-11-12 Thread Pierre GM
> > I think numpy.array(object) always makes a copy. > > > > You want numpy.asarray(object) which will make a view if object exposes > > the array interface and matches the type and sizes requested. FYI, numpy.asarray is a shortcut for numpy.array(copy=False), numpy.asanyarray for numpy.array(cop

Re: [Numpy-discussion] Getting an array interface and using it

2007-11-12 Thread Matthieu Brucher
2007/11/12, Christopher Barker <[EMAIL PROTECTED]>: > > Matthieu Brucher wrote: > > I have an object that exposes an array interface. I want to modify the > > data it contains, but using numpy.array(myObject) seems to copy the data > > and thus my object is not modified. Am I mistaken or did I make

Re: [Numpy-discussion] Getting an array interface and using it

2007-11-12 Thread Christopher Barker
Matthieu Brucher wrote: > I have an object that exposes an array interface. I want to modify the > data it contains, but using numpy.array(myObject) seems to copy the data > and thus my object is not modified. Am I mistaken or did I make a > mistake in my array interface ? I think numpy.array(o

Re: [Numpy-discussion] Problem with numpy.linalg.eig?

2007-11-12 Thread David Cournapeau
On Nov 13, 2007 3:37 AM, Keith Goodman <[EMAIL PROTECTED]> wrote: > > On Nov 12, 2007 10:10 AM, Peter Creasey <[EMAIL PROTECTED]> wrote: > > The following code calling numpy v1.0.4 fails to terminate on my machine, > > which was not the case with v1.0.3.1 > > > > from numpy import arange, float

Re: [Numpy-discussion] Numpy book and PyArray_CastToType

2007-11-12 Thread Matthieu Brucher
2007/11/12, Albert Strasheim <[EMAIL PROTECTED]>: > > Hello, > > Have you considered looking at the source for PyArray_CastToType in > core/src/arrayobject.c? > > Cheers, > > Albert Well no :( I didn't know where to look (and this should be fixed in the book as well...) Matthieu -- French PhD s

Re: [Numpy-discussion] Problem with numpy.linalg.eig?

2007-11-12 Thread Lou Pecora
Works fine on my computer (Mac OS X 10.4), Python 2.4. Runs in a second or so. -- Lou Pecora ---Peter wrote: Hi all, The following code calling numpy v1.0.4 fails to terminate on my machine, which was not the case with v1.0.3.1 from numpy import arange, float64 from numpy.linalg impor

Re: [Numpy-discussion] Problem with numpy.linalg.eig?

2007-11-12 Thread Keith Goodman
On Nov 12, 2007 10:10 AM, Peter Creasey <[EMAIL PROTECTED]> wrote: > The following code calling numpy v1.0.4 fails to terminate on my machine, > which was not the case with v1.0.3.1 > > from numpy import arange, float64 > from numpy.linalg import eig > a = arange(13*13, dtype = float64)

[Numpy-discussion] Problem with numpy.linalg.eig?

2007-11-12 Thread Peter Creasey
Hi all, The following code calling numpy v1.0.4 fails to terminate on my machine, which was not the case with v1.0.3.1 from numpy import arange, float64 from numpy.linalg import eig a = arange(13*13, dtype = float64) a.shape = (13,13) a = a%17 eig(a) Regards, Peter _

Re: [Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread Robert Kern
D.Hendriks (Dennis) wrote: > Alan G Isaac wrote: >> On Mon, 12 Nov 2007, "D.Hendriks (Dennis)" apparently wrote: >> >>> All of this makes me doubt the correctness of the formula >>> you proposed. >>> >> It is always a good idea to hesitate before doubting Robert. >> http://en.wikipedia.o

Re: [Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread Ryan May
D.Hendriks (Dennis) wrote: > Alan G Isaac wrote: >> On Mon, 12 Nov 2007, "D.Hendriks (Dennis)" apparently wrote: >> >>> All of this makes me doubt the correctness of the formula >>> you proposed. >>> >> It is always a good idea to hesitate before doubting Robert. >> http://en.wikipedia.o

Re: [Numpy-discussion] Numpy book and PyArray_CastToType

2007-11-12 Thread Albert Strasheim
Hello, Have you considered looking at the source for PyArray_CastToType in core/src/arrayobject.c? Cheers, Albert On Mon, 12 Nov 2007, Matthieu Brucher wrote: > Nobody can answer this ? > > Matthieu > > 2007/11/4, Matthieu Brucher <[EMAIL PROTECTED]>: > > > > Hi, > > > > I'm trying to use P

[Numpy-discussion] Getting an array interface and using it

2007-11-12 Thread Matthieu Brucher
Hi, I have an object that exposes an array interface. I want to modify the data it contains, but using numpy.array(myObject) seems to copy the data and thus my object is not modified. Am I mistaken or did I make a mistake in my array interface ? Matthieu -- French PhD student Website : http://mi

Re: [Numpy-discussion] Numpy book and PyArray_CastToType

2007-11-12 Thread Matthieu Brucher
Nobody can answer this ? Matthieu 2007/11/4, Matthieu Brucher <[EMAIL PROTECTED]>: > > Hi, > > I'm trying to use PyArray_CastToType(), but according to the book, there > are two arguments, a PyArrayObject* and a PyArrayDescr*, but according to > the header file, there are three arguments, an addi

Re: [Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread D.Hendriks (Dennis)
Alan G Isaac wrote: On Mon, 12 Nov 2007, "D.Hendriks (Dennis)" apparently wrote: All of this makes me doubt the correctness of the formula you proposed. It is always a good idea to hesitate before doubting Robert. http://en.wikipedia.org/wiki/Weibull_distribution#Generating_Weibull-di

Re: [Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread Alan G Isaac
On Mon, 12 Nov 2007, "D.Hendriks (Dennis)" apparently wrote: > All of this makes me doubt the correctness of the formula > you proposed. It is always a good idea to hesitate before doubting Robert. http://en.wikipedia.org/wiki/Weibull_distribution#Generating_Weibull-distributed_random_variates

[Numpy-discussion] Merging new (optional) build system in the trunk ?

2007-11-12 Thread David Cournapeau
Hi, I would appreciate to get some comment on whether there is any chance to get my numpy.scons branch merge into the trunk at some near future. I feel to have reached the point where the only big thing missing is more testing. I tried to test it on many platforms, but there is a limit to

Re: [Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread D.Hendriks (Dennis)
Robert Kern wrote: D.Hendriks (Dennis) wrote: According to (for instance) http://en.wikipedia.org/wiki/Weibull_distribution the Weibull distribution has two parameters: lambda > 0 is the scale parameter (real) and k > 0 is the shape parameter (real). However, the numpy.random.weibull func

Re: [Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread Robert Kern
D.Hendriks (Dennis) wrote: > According to (for instance) > http://en.wikipedia.org/wiki/Weibull_distribution the Weibull > distribution has two parameters: lambda > 0 is the scale parameter > (real) and k > 0 is the shape parameter (real). However, the > numpy.random.weibull function has only a

[Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread D.Hendriks (Dennis)
According to (for instance) http://en.wikipedia.org/wiki/Weibull_distribution the Weibull distribution has two parameters: lambda > 0 is the scale parameter (real) and k > 0 is the shape parameter (real). However, the numpy.random.weibull function has only a single 'a' parameter (except for th