[Numpy-discussion] SciPy should now compile and install

2006-07-07 Thread Travis Oliphant
All changes needed for scipy to compile and install with the new NumPy are now done. As a side benefit, the numarray C-API compatibility module also received a test as it is now used to compile scipy/ndimage So, SVN versions of NumPy / SciPy / and Matplotlib should all work together now. -Tr

[Numpy-discussion] Easy way to get NumPy code to compile

2006-07-07 Thread Travis Oliphant
If you have been a user of NumPy. The easy way to update your code so that it compiles even with the latest changes to the naming-scheme is to replace #include "numpy/arrayobject.h" with #include "numpy/noprefix.h" This will generate the prefix-less names (and the other _FLAGS and OWN_DATA

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-07 Thread Sebastian Haase
Sasha wrote: > On 7/6/06, Bill Baxter <[EMAIL PROTECTED]> wrote: >> ... >> Yep, like Tim said. The usage is say a N sets of basis vectors. Each set >> of basis vectors is a matrix. > > This brings up a feature that I really miss from numpy: an ability to do > > array([f(x) for x in a]) > > wit

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Sebastian Haase
Travis Oliphant wrote: > Travis Oliphant wrote: >> This is a call for a vote on each of the math attributes. Please post >> your vote as >> >> +1 : support >> +0 : don't care so go ahead >> -0 : don't care so why do it >> -1 : against >> >> Vote on the following issues separately: >> >> >> >

Re: [Numpy-discussion] NumPy C-API now has prefixes

2006-07-07 Thread Stefan van der Walt
On Fri, Jul 07, 2006 at 07:06:58PM -0600, Fernando Perez wrote: > On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > I just committed a big change to the NumPy SVN (r2773-r2777) which adds > > the prefix npy_ or NPY_ to all names not otherwise pre-fixed. > > > > There is also a noprefix.h h

Re: [Numpy-discussion] NumPy C-API now has prefixes

2006-07-07 Thread Albert Strasheim
Hello all > Please, > > try out the new C-API and let's get the bugs wrinkled out. > > Hopefully this will give us a more solid foundation for the future... > I've already committed changes to matplotlib SVN that allow it to work > with old and new NumPy. What implications, if any, do these cha

[Numpy-discussion] I think something broke badly today in numpy/scipy...

2006-07-07 Thread Fernando Perez
Hi all, I updated earlier today (about 4 hours ago) numpy/scipy SVN, and all of a sudden my codes broke left and right. Backing off to In [3]: numpy.__version__ Out[3]: '0.9.9.2737' In [4]: scipy.__version__ Out[4]: '0.5.0.2044' things are OK again. I am really sorry not to be able to provide

Re: [Numpy-discussion] NumPy C-API now has prefixes

2006-07-07 Thread Fernando Perez
On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > I just committed a big change to the NumPy SVN (r2773-r2777) which adds > the prefix npy_ or NPY_ to all names not otherwise pre-fixed. > > There is also a noprefix.h header that allows you to use the names > without the prefixes defined, as

[Numpy-discussion] NumPy C-API now has prefixes

2006-07-07 Thread Travis Oliphant
I just committed a big change to the NumPy SVN (r2773-r2777) which adds the prefix npy_ or NPY_ to all names not otherwise pre-fixed. There is also a noprefix.h header that allows you to use the names without the prefixes defined, as before Plus: 1) The special FLAG names with _FLAGS now hav

Re: [Numpy-discussion] What's wrong with matrices?

2006-07-07 Thread Keith Goodman
On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Bill Baxter wrote: > > 4) eye,empty,rand,ones,zeros,arange and anything else that builds an > > array from scratch or from a python list should have a matrix equivalent > Would > > from numpy.defmatrix import ones, zeros, ... > > work? Can de

[Numpy-discussion] Broken tMIN/tMAX macros

2006-07-07 Thread Sasha
Travis' recent change highlighted the definitions of tMIN/tMAX macros. Typed min/max were a subject for some heated discussion between Linux kernel developers many years ago that resulted in the followin

[Numpy-discussion] extended dot

2006-07-07 Thread Tim Hochberg
So I put together a prototype for an extended dot function that takes multiple arguments. This allows multiple dots to be computed in a single call thusly: dot(dot(dot(a, b), c), d) => dotn(a, b, c, d) On Bill Baxter's suggestion, dotn attempts to do the dots in an order that minimizes opera

Re: [Numpy-discussion] OptimizationDemo [was: Numpy subversion compatibility with Scipy release? ] RESOLVED

2006-07-07 Thread Mark Heslep
The problem was matplotlib-0.87.2-1; it is broken wrt to the Demo. The lastest matplotlib .3 works. In summary, to run the demo, the following versions were required: Released Packages, all built from tar balls: -- matplotlib-0.87.3 , ie, the c

Re: [Numpy-discussion] extended dot

2006-07-07 Thread Tim Hochberg
Tim Hochberg wrote: > > > So, I put together of a prototype dot function > > dot( > Ooops! This wasn't supposed to go out yet, sorry. More later. -tim 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

[Numpy-discussion] extended dot

2006-07-07 Thread Tim Hochberg
So, I put together of a prototype dot function dot( 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 Apache Geronimo http://sel.as-u

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

2006-07-07 Thread Fernando Perez
On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > I'm not opposed to putting a *short* prefix in front of everything (the > Int32, Float64, stuff came from numarray which now has it's own > back-ward compatible header where it could be placed now anyway). > Perhaps npy_ would be a suitable

Re: [Numpy-discussion] What's wrong with matrices?

2006-07-07 Thread Sven Schreiber
Ed Schofield schrieb: > > Okay ... ... let's make this the thread ;) > I'd like to know why you, Sven, and anyone else on the list have gone > back to using arrays after trying matrices. What was inconvenient about > them? I'd like a nice juicy list. The whole purpose of the matrix > class i

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

2006-07-07 Thread Travis Oliphant
Fernando Perez wrote: >On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > > >>Also, (in latest SVN) the MAXMIN macros can be avoided using >> >>#define PYA_NOMAXMIN >> >>before including arrayobject.h >> >> > >Mmh, this looks crufty to me: special cases like these look bad in a >libr

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-07 Thread David M. Cooke
On Fri, 7 Jul 2006 15:26:41 +0100 "George Nurser" <[EMAIL PROTECTED]> wrote: > On 07/07/06, Robert Hetland <[EMAIL PROTECTED]> wrote: > [snip] > > However, I use transpose often when not dealing with linear algebra, in > > particular with reading in data, and putting various columns into > > varia

[Numpy-discussion] .M .A .T .H attribute result

2006-07-07 Thread Travis Oliphant
I didn't compile the results, but the discussion on the idea of adding new attributes to the array object led to the following result. Added: .T attribute to mean self.transpose() .T This was rather controversial with many possibilities emerging. In the end, I think the common case of goin

Re: [Numpy-discussion] OptimizationDemo [was: Numpy subversion compatibility with Scipy release? ]

2006-07-07 Thread Robert Kern
Mark Heslep wrote: > Robert Kern wrote: >> The latest SVN revisions should match (it's a bug, otherwise). numpy 2761 is >> recent enough that an SVN checkout of scipy will probably be fine. >> > Yes SVN scipy/numpy fix the problem. Sorry, I missed Travis's post on > scipy-user here: > http://p

Re: [Numpy-discussion] OptimizationDemo [was: Numpy subversion compatibility with Scipy release? ]

2006-07-07 Thread Mark Heslep
Robert Kern wrote: > > The latest SVN revisions should match (it's a bug, otherwise). numpy 2761 is > recent enough that an SVN checkout of scipy will probably be fine. > Yes SVN scipy/numpy fix the problem. Sorry, I missed Travis's post on scipy-user here: http://projects.scipy.org/pipermail/

[Numpy-discussion] Missing docstrings

2006-07-07 Thread David Huard
Hi, For the first release, it would be nice if every function had a docstring, even a small one. There are 279 callable items in the numpy namespace, and 94 of those lack a docstring, albeit most of those probably don't get much usage.  To help the process, I filed Ticket #174 and attached a c

Re: [Numpy-discussion] Numpy subversion compatibility with Scipy release?

2006-07-07 Thread Robert Kern
Mark Heslep wrote: > Is there any general sync point with development Numpy from subversion > and the SciPy releases? Ive got Numpy 0.9.9.2761 and Scipy 0.4.9 > installed with (I believe several) breakages, in particular: > >> In [8]: from scipy import special > ... >> /usr/lib/python2.4/site-p

[Numpy-discussion] Numpy subversion compatibility with Scipy release?

2006-07-07 Thread Mark Heslep
Is there any general sync point with development Numpy from subversion and the SciPy releases? Ive got Numpy 0.9.9.2761 and Scipy 0.4.9 installed with (I believe several) breakages, in particular: > In [8]: from scipy import special ... > /usr/lib/python2.4/site-packages/scipy/linalg/basic.py >

Re: [Numpy-discussion] What's wrong with matrices?

2006-07-07 Thread Travis Oliphant
Bill Baxter wrote: > On 7/7/06, *Ed Schofield* <[EMAIL PROTECTED] > > wrote: > > Okay ... ... let's make this the thread ;) > I'd like to know why you, Sven, and anyone else on the list have gone > back to using arrays after trying matrices. What was inconve

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-07 Thread Christopher Barker
Robert Kern wrote: > Just > because linear algebra is "the base" for a lot of numerical computing does > not > mean that everyone is using numpy arrays for linear algebra all the time. > Much > less does it mean that all of those conventions you've devised should be > shoved > into the core

Re: [Numpy-discussion] ix_ and boolean indices

2006-07-07 Thread Travis Oliphant
Martin Wiechert wrote: > Hi all, > > for me > > M [ix_(I, J)] > > does not work if I, J are boolean arrays. Is this intended or a bug/missing > feature? > Which version?Using boolean arrays as separate indices was a recent feature. You have to get SVN to use it. -Travis Using Tomcat b

Re: [Numpy-discussion] Numpy import problem

2006-07-07 Thread Christopher Barker
Satellite Data Research Group wrote: > Quoting Christopher Barker <[EMAIL PROTECTED]>: >> Which Python 2.4.1 are you using? It would be great if you would give >> the Python2.4.3 version found here a try: >> >> http://www.pythonmac.org/packages/py24-fat/index.html > Thanks for that, python 2.4.3

Re: [Numpy-discussion] Enhancing dot()

2006-07-07 Thread Charles R Harris
On 7/7/06, Bill Baxter <[EMAIL PROTECTED]> wrote: On 7/7/06, Tim Hochberg <[EMAIL PROTECTED]> wrote: > The funny thing is that having a dot(a,b,c,...) would lead to the> exact same kind of hidden performance problems you're arguing against.Not exactly arguing -- this isn't why I don't like H and f

Re: [Numpy-discussion] ix_ and boolean indices

2006-07-07 Thread Pau Gargallo
On 7/7/06, Martin Wiechert <[EMAIL PROTECTED]> wrote: > Hi all, > > for me > > M [ix_(I, J)] > > does not work if I, J are boolean arrays. Is this intended or a bug/missing > feature? > > And is there a way (other than I = where (I) [0] etc.) to make it work? > > Thanks, > Martin it is a recent fe

[Numpy-discussion] Missing docstrings

2006-07-07 Thread David Huard
Hi, For the beta release, it would be nice if every function had a docstring, even a small one.  See Ticket #174Missing docstrings:In [116]: ['issubsctype', 'unicode_', 'string', 'float96', 'pkgload', 'void', 'unicode0', 'void0', 'object0', 'memmap', 'nan_to_num', 'PackageLoader', 'object_', 'dtype

Re: [Numpy-discussion] What's wrong with matrices?

2006-07-07 Thread Keith Goodman
On 7/7/06, Ed Schofield <[EMAIL PROTECTED]> wrote: > I'd like to help to make matrices more usable. Tell me what you want, > and I'll work on some patches. I can't pass up an offer like that. DIAG diag(M) returns an array. It would be nice if diag(M) returned asmatrix(diag(M)).T. It would als

[Numpy-discussion] ix_ and boolean indices

2006-07-07 Thread Martin Wiechert
Hi all, for me M [ix_(I, J)] does not work if I, J are boolean arrays. Is this intended or a bug/missing feature? And is there a way (other than I = where (I) [0] etc.) to make it work? Thanks, Martin Using Tomcat but need to do more? Need to support web services, security? Get stuff done qu

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Charles R Harris
Does anyone use transpose for anything besides two dimensional arrays? For arrays that aren't matrices at heart the meaning of transpose is pretty arbitrary, so the only virtue I see in having an attribute would be less typeing. So put it in the documentation. As an aside, being able to specify axi

[Numpy-discussion] numpy book

2006-07-07 Thread Jonathan Taylor
I bought a copy of the numpy book sometime in January which I have since lost in a careless mistake. Is there a way to get another (updated) copy? I couldn't see how this was done on the website. Thanks, Jonathan -- Jo

Re: [Numpy-discussion] What's wrong with matrices?

2006-07-07 Thread Bill Baxter
On 7/7/06, Ed Schofield <[EMAIL PROTECTED]> wrote: Bill Baxter wrote:> I would be all for a matrix class that was on equal footing with array> and as easy to use as matrices in Matlab.  But my experience using> numpy.matrix was far from that, and, given the lack of enthusiasm for > matrices around

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-07 Thread Gary Ruben
Sasha wrote: > On 7/6/06, Bill Baxter <[EMAIL PROTECTED]> wrote: >> ... >> Yep, like Tim said. The usage is say a N sets of basis vectors. Each set >> of basis vectors is a matrix. > > This brings up a feature that I really miss from numpy: an ability to do > > array([f(x) for x in a]) > > wit

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread George Nurser
On 07/07/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1)

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-07 Thread George Nurser
On 07/07/06, Robert Hetland <[EMAIL PROTECTED]> wrote: [snip] > However, I use transpose often when not dealing with linear algebra, in > particular with reading in data, and putting various columns into > variables. Also, occasional in plotting (which expects things in 'backward' > order relative

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Paul Barrett
On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1) .T

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Stefan van der Walt
On Thu, Jul 06, 2006 at 10:26:12PM -0600, Travis Oliphant wrote: > 1) .T Have some kind of .T attribute -1, since the expected behaviour of .T is different depending on problem context. >a) .T == .swapaxes(-2,-1) The fact that this was proposed just demonstrates the fact. If you have a (10

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Robert Hetland
+11b) .T == .transpose() -1 all others On Jul 7, 2006, at 12:26 AM, Travis Oliphant wrote: > > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vo

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-07 Thread Robert Hetland
On Jul 6, 2006, at 2:54 PM, Robert Kern wrote:I don't think that just because arrays are often used for linear algebra that  linear algebra assumptions should be built in to the core array type. True.  This argues against the MAH attributes.  However, I use transpose often when not dealing with lin

Re: [Numpy-discussion] What's wrong with matrices?

2006-07-07 Thread Ed Schofield
Bill Baxter wrote: > I think the thread to this point can be pretty much summarized by: > > while True: > Bill: "2D transpose is common so it should have a nice syntax" > Tim, Robert, Sasha, and Ed: "No it's not." > > Very well. I think it may be a self fulfilling prophecy, though. > I.e.

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Paulo Jose da Silva e Silva
Em Qui, 2006-07-06 às 22:26 -0600, Travis Oliphant escreveu: > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > >

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Bruce Southey
On 7/6/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1) .T

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-07 Thread Bill Baxter
I think the thread to this point can be pretty much summarized by:while True:    Bill: "2D transpose is common so it should have a nice syntax"    Tim, Robert, Sasha, and Ed: "No it's not." Very well.  I think it may be a self fulfilling prophecy, though.  I.e. if matrix operations are cumbersome t

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Ed Schofield
On 07/07/2006, at 6:26 AM, Travis Oliphant wrote: > 1) .T Have some kind of .T attribute -1 The meaning of .T is unclear for ndim != 2, as the plethora of sub- vote options shows. And we already have a matrix object designed explicitly for the case ndim == 2. Let's make matrix objects more

Re: [Numpy-discussion] Call for a vote on .M .A .T .H attributes

2006-07-07 Thread Sven Schreiber
Travis Oliphant schrieb: > > 1) .T Have some kind of .T attribute > +0 (the discussion in the .T thread convinced me it's better to keep the matrix playground as a separate subclass, and so it's not important for me what happens with pure arrays) > > 2) .H returns .T.conj() +0 > > > 3) .

[Numpy-discussion] Why is my array not contiguous?

2006-07-07 Thread Jens Jørgen Mortensen
Hi! With numpy-0.9.9.2726, I do this: >>> x = arange(4) >>> y = x[newaxis, :] I would expect both arrays to be contiguous: >>> x.flags.contiguous, y.flags.contiguous (True, False) Shouldn't y be contiguous? Maybe it's because of the strange strides: >>> y.strides (0, 4) >>> y.strides =

Re: [Numpy-discussion] Speed degression?

2006-07-07 Thread Steffen Loeck
On Thursday 06 July 2006, Travis Oliphant wrote: > This can test the speed of the implementations. With the latest modifications i get the following Results (in usec per loop):                                      sin-array            mod-array   use_scalarma

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-07 Thread Tim Hochberg
Bill Baxter wrote: > On 7/7/06, *Robert Kern* <[EMAIL PROTECTED] > > wrote: > > Bill Baxter wrote: > > I am also curious, given the number of times I've heard this > nebulous > > argument of "there are lots kinds of numerical computing that don't > > i