[Numpy-discussion] Moving this mailing list to scipy.org

2006-06-23 Thread Robert Kern
Thanks to Sourceforge's new "feature" of ads on the bottom of all list emails, it has been suggested that we move this mailing list to scipy.org. I've gotten some feedback from several of you already, all in favor of moving the mailing list from Sourceforge to scipy.org. However, I know there ar

Re: [Numpy-discussion] matlab translation

2006-06-23 Thread Robert Kern
Keith Goodman wrote: >> I'm porting by hand. It does not seem easy to me. And even if it were Mathew Yeates wrote: > Ah. Do I detect a dare? Could start first by using Octaves matlab parser. Let's just say that anyone coming to this list saying something like, "It doesn't seem like it would be a

Re: [Numpy-discussion] matlab translation

2006-06-23 Thread Gary Ruben
One possible starting point for this would be Chris Stawarz's i2py translator which attempts to do this for IDL . It might be possible to build on this by getting it working for current numpy. The production rules for MATLAB might be gleaned from Octave.

Re: [Numpy-discussion] record iteration (convert a 0-d array, iteration over non-sequence)

2006-06-23 Thread Travis Oliphant
John Parejko wrote: > Greetings! I'm having trouble using records. I'm not sure whether to > report this as a bug, but it certainly isn't a feature! I would like to be > able to iterate over the individual rows in a record array, like so: > That is probably reasonable, but as yet is unsuppo

[Numpy-discussion] record iteration (convert a 0-d array, iteration over non-sequence)

2006-06-23 Thread John Parejko
Greetings! I'm having trouble using records. I'm not sure whether to report this as a bug, but it certainly isn't a feature! I would like to be able to iterate over the individual rows in a record array, like so: >>> import numpy.core.records as rec >>> x=rec.array([[1,1.1,'1.0'],[2,2.2,'2.

Re: [Numpy-discussion] matlab translation

2006-06-23 Thread Ryan Krauss
If people could post lines of Matlab code and proposed numpy could, we could try some regexp's that could do some of this. Ryan On 6/23/06, Keith Goodman <[EMAIL PROTECTED]> wrote: > On 6/23/06, Mathew Yeates <[EMAIL PROTECTED]> wrote: > > > > > > > > I'm porting by hand. It does not seem easy to

Re: [Numpy-discussion] Current copy

2006-06-23 Thread Travis Oliphant
Tom Loredo wrote: >Hi Travis, > > > >>I'm actually preparing the 1.0 release version, instead. >> >>Here's the latest, though... >> >> > >Thanks! > >I hate to be a nuisance about this, but what's the status >of the latest releases of numpy/scipy? Numpy 0.9.8 gives >a segfault on my FC3 box

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Alan G Isaac
> Alan G Isaac wrote: >> I can roughly understand why a.ravel() returns a matrix; >> but is there a good reason to forbid truly flattening the matrix? On Fri, 23 Jun 2006, Travis Oliphant apparently wrote: > Because matrices are never 1-d. This is actually pretty > consistent behavior. Yes

Re: [Numpy-discussion] flatiter and inequality comparison

2006-06-23 Thread Travis Oliphant
Alan G Isaac wrote: >I do not understand how to think about this: > >>>> x=arange(3).flat >>>> x > >>>> x>2 >True >>>> x>10 >True > >Why? (I realize this behaves like xrange, >so this may not be a numpy question, >but I do not understand that behavior either.) > > Th

Re: [Numpy-discussion] f.p. powers and masked arrays

2006-06-23 Thread Michael Fitzgerald
Ping! Is anyone else seeing this? It should be easy to test. If so, I think it's a bug. Best, Mike On Jun 21, 2006, at 9:39 PM, Michael Fitzgerald wrote: > > Hello all, > > I'm encountering some (relatively new?) behavior with masked arrays > that > strikes me as bizarre. Raising zero

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Travis Oliphant
Travis Oliphant wrote: >Alan G Isaac wrote: > > >> >> >I think you are right that this is a bug, though. Because __array__() >(which is where the behavior comes from) should return a base-class >array (not a sub-class). > > This is fixed in SVN. -Travis Using Tomcat but need to do mo

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Travis Oliphant
Alan G Isaac wrote: >>Alan G Isaac wrote: >> >> >>>Why is a.flat not the same as a.A.flat? >>> >>> > > >On Fri, 23 Jun 2006, Travis Oliphant apparently wrote: > > >>It is the same object except for the pointer to the >>underlying array. When asarray(a.flat) get's called it >>look

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Alan G Isaac
> Alan G Isaac wrote: >> Why is a.flat not the same as a.A.flat? On Fri, 23 Jun 2006, Travis Oliphant apparently wrote: > It is the same object except for the pointer to the > underlying array. When asarray(a.flat) get's called it > looks to the underlying array to get the sub-class and >

Re: [Numpy-discussion] matlab translation

2006-06-23 Thread Keith Goodman
On 6/23/06, Mathew Yeates <[EMAIL PROTECTED]> wrote: > > > > > I'm porting by hand. It does not seem easy to me. And even if it were > Ah. Do I detect a dare? Could start first by using Octaves matlab parser. (Let me help you recruit people to do the work) "There is no way in the world that this

Re: [Numpy-discussion] matlab translation

2006-06-23 Thread Mathew Yeates
> > I'm porting by hand. It does not seem easy to me. And even if it were Ah. Do I detect a dare? Could start first by using Octaves matlab parser. Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easi

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Travis Oliphant
Alan G Isaac wrote: >>Alan G Isaac wrote: >> >> >>>Hmm. One would think that diag() would accept a flatiter >>>object, but it does not. Shouldn't it?? >>> >>> > > >On Fri, 23 Jun 2006, Travis Oliphant apparently wrote: > > >>It doesn't? >>try: >>a = rand(3,4) >>diag(a.flat).sha

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Alan G Isaac
> Alan G Isaac wrote: >> Hmm. One would think that diag() would accept a flatiter >> object, but it does not. Shouldn't it?? On Fri, 23 Jun 2006, Travis Oliphant apparently wrote: > It doesn't? > try: > a = rand(3,4) > diag(a.flat).shape OK, but then try: >>> a=N.mat(a) >>> N.diag(a.fla

Re: [Numpy-discussion] matlab translation

2006-06-23 Thread Keith Goodman
On 6/23/06, Mathew Yeates <[EMAIL PROTECTED]> wrote: > This is probably in an FAQ somewhere but . > > Is there a tool out there for translating Matlab to Numeric? I found a > 1999 posting by Travis asking the same thing! It doesn't seem like it > would be all THAT difficult to write. I'm porti

[Numpy-discussion] matlab translation

2006-06-23 Thread Mathew Yeates
This is probably in an FAQ somewhere but . Is there a tool out there for translating Matlab to Numeric? I found a 1999 posting by Travis asking the same thing! It doesn't seem like it would be all THAT difficult to write. Mathew Using Tomcat but need to do more? Need to support web servic

Re: [Numpy-discussion] Matrix construction

2006-06-23 Thread Travis Oliphant
Ed Schofield wrote: >On 22/06/2006, at 12:40 AM, Bill Baxter wrote: > > > >>Actually I think using mat() (just an alias for the matrix >>constructor) is a bad way to do it. That mat() (and most others on >>that page) should probably be replaced with asmatrix() to avoid the >>copy. >>

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Travis Oliphant
Alan G Isaac wrote: >On Fri, 23 Jun 2006, Keith Goodman apparently wrote: > > >>my x is a Nx1 matrix. I can't get it to work with matrices. >> >> > >Hmm. One would think that diag() would accept a flatiter >object, but it does not. Shouldn't it?? > > It doesn't? try: a = rand(3,4)

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Alan G Isaac
On Fri, 23 Jun 2006, Alan G Isaac apparently wrote: > you can squeeze x True, but a silly solution. Alan Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Se

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread David Douard
On Fri, Jun 23, 2006 at 07:55:47AM -0700, Keith Goodman wrote: > On 6/23/06, Sven Schreiber <[EMAIL PROTECTED]> wrote: > > Keith Goodman schrieb: > > > How do I make a NxN diagonal matrix with a Nx1 column vector x along > > > the diagonal? > > > > > > > >>> help(n.diag) > > Help on function diag i

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Alan G Isaac
On Fri, 23 Jun 2006, Keith Goodman apparently wrote: > my x is a Nx1 matrix. I can't get it to work with matrices. Hmm. One would think that diag() would accept a flatiter object, but it does not. Shouldn't it?? But anyway, you can squeeze x: >>> x matrix([[ 0.46474951], [ 0.0688041 ]

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Alan G Isaac
On Fri, 23 Jun 2006, Sven Schreiber apparently wrote: help(n.diag) > Help on function diag in module numpy.lib.twodim_base: > diag(v, k=0) > returns the k-th diagonal if v is a array or returns a array > with v as the k-th diagonal if v is a vector. That is pretty damn obscure.

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Sven Schreiber
Keith Goodman schrieb: > > Isn't rand(3,1) a vector? afaik not in numpy's terms, because two numbers are given for the dimensions -- I also struggle with that, because I'm a matrix guy like you ;-) > > Off list I was given the example: > x=rand(3) > diag(3) > > That works. But my x is a Nx1

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Keith Goodman
On 6/23/06, Sven Schreiber <[EMAIL PROTECTED]> wrote: > Keith Goodman schrieb: > > How do I make a NxN diagonal matrix with a Nx1 column vector x along > > the diagonal? > > > > >>> help(n.diag) > Help on function diag in module numpy.lib.twodim_base: > > diag(v, k=0) > returns the k-th diagona

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Joris De Ridder
On Friday 23 June 2006 16:34, Sven Schreiber wrote: [SS]: Keith Goodman schrieb: [SS]: > How do I make a NxN diagonal matrix with a Nx1 column vector x along [SS]: > the diagonal? [SS]: > [SS]: [SS]: >>> help(n.diag) [SS]: Help on function diag in module numpy.lib.twodim_bas

Re: [Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Sven Schreiber
Keith Goodman schrieb: > How do I make a NxN diagonal matrix with a Nx1 column vector x along > the diagonal? > >>> help(n.diag) Help on function diag in module numpy.lib.twodim_base: diag(v, k=0) returns the k-th diagonal if v is a array or returns a array with v as the k-th diagonal if

[Numpy-discussion] How do I make a diagonal matrix?

2006-06-23 Thread Keith Goodman
How do I make a NxN diagonal matrix with a Nx1 column vector x along the diagonal? Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apac

Re: [Numpy-discussion] fromfile croaking on windows

2006-06-23 Thread Albert Strasheim
Hello all Travis Oliphant wrote: > Mathew Yeates wrote: > > when I try and load a file with numpy.fromfile I keep getting a message > > > 7245092 items requested but only 3899 read. Its always the same number > read. > > > > > Which platform are you on? Could you show exactly how you are ca

[Numpy-discussion] eye and identity: why both?

2006-06-23 Thread Sven Schreiber
identity seems to be a "crippled" version of eye without any value added, apart from backwards-compatibility; So from a user point of view, which one does numpy recommend? And from a developer point of view (which doesn't really apply to me, of course), should identity maybe become an alias for e