Re: [Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

2006-07-18 Thread Bob Ippolito
On Jul 18, 2006, at 9:16 PM, Robert Kern wrote: > Josh Marshall wrote: >> so it seems like the entire purpose of PackageLoader is to make life >> difficult for me, just to save a few lines of typing. :) Seriously, >> can a numpy developer tell me why PackageLoader is necessary? > > I can't think

Re: [Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

2006-07-18 Thread Robert Kern
Travis Oliphant wrote: > Robert Kern wrote: >> Josh Marshall wrote: >> >>> so it seems like the entire purpose of PackageLoader is to make life >>> difficult for me, just to save a few lines of typing. :) Seriously, >>> can a numpy developer tell me why PackageLoader is necessary? >>> >

Re: [Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

2006-07-18 Thread Travis Oliphant
Robert Kern wrote: > Josh Marshall wrote: > >> so it seems like the entire purpose of PackageLoader is to make life >> difficult for me, just to save a few lines of typing. :) Seriously, >> can a numpy developer tell me why PackageLoader is necessary? >> > > I can't think of a good reas

Re: [Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

2006-07-18 Thread Robert Kern
Josh Marshall wrote: > so it seems like the entire purpose of PackageLoader is to make life > difficult for me, just to save a few lines of typing. :) Seriously, > can a numpy developer tell me why PackageLoader is necessary? I can't think of a good reason why it's used in __init__.py the way

[Numpy-discussion] calling a f2py made module with numarray (mem shared with numpy ?)

2006-07-18 Thread Sebastian Haase
Hi, Having to use Fortran again, I had a look at f2py .. I looks really great !! Everything seems to run out of the box !! Thanks a lot ! I think I tried intend(inout)and then fed in an array object that really was an numarray as opposed to a numpy array. I was surprised that the array did

Re: [Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

2006-07-18 Thread Bob Ippolito
On Jul 18, 2006, at 7:26 PM, Josh Marshall wrote: > Thanks for the fix Bob. > > Unfortunately Matplotlib does not work with zipped data files, > after all that. So, we'll leave the recipes as is, as they work for > now. > > I suspect the way forward is to get numpy/Matplotlib/scipy working

Re: [Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

2006-07-18 Thread Josh Marshall
Thanks for the fix Bob. Unfortunately Matplotlib does not work with zipped data files, after all that. So, we'll leave the recipes as is, as they work for now. I suspect the way forward is to get numpy/Matplotlib/scipy working with setuptools and using pkg_resources to manage the data files.

Re: [Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

2006-07-18 Thread Bob Ippolito
On Jul 18, 2006, at 5:32 PM, Josh Marshall wrote: > Thanks for the info on how the various recipes work, Bob. Very > helpful. > > On 19/07/2006, at 9:28 AM, Bob Ippolito wrote: >> The recipe mechanism doesn't allow for it because it doesn't >> generally make sense. There are very few packages t

Re: [Numpy-discussion] numarray uses "rank" instead "ndim"

2006-07-18 Thread Travis Oliphant
Sebastian Haase wrote: >Hi, >(Thanks to Travis and Todd for answering my last "dot"-question) > >I'm trying to adjust my numarray based code to also run with numpy. >It seems that a (maybe the only left) problem is that numarray had >arr.rank giving the value of len(arr.shape) >while in numpy thi

[Numpy-discussion] numarray uses "rank" instead "ndim"

2006-07-18 Thread Sebastian Haase
Hi, (Thanks to Travis and Todd for answering my last "dot"-question) I'm trying to adjust my numarray based code to also run with numpy. It seems that a (maybe the only left) problem is that numarray had arr.rank giving the value of len(arr.shape) while in numpy this is now called arr.ndim Is t

Re: [Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

2006-07-18 Thread Josh Marshall
Thanks for the info on how the various recipes work, Bob. Very helpful. On 19/07/2006, at 9:28 AM, Bob Ippolito wrote: > The recipe mechanism doesn't allow for it because it doesn't > generally make sense. There are very few packages that can find > their resources in an alternative manner. I'

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Christopher Barker
Robert Kern wrote: > I'm definitely -1 on putting them in numpy. numpy is large enough as it is. > I'm > -0 on making a standalone package. The time would be better spent on making > sure > that scipy subpackages can be downloaded, built and installed individually. +1 The whole SciPy installa

Re: [Numpy-discussion] numarray bug: dot product between 2x2 and 3x2x3 on Mac different from PC

2006-07-18 Thread Todd Miller
Sebastian Haase wrote: > OK - understood. Combining int32 with float64 proves to be less > cumbersome ... > > Why are numarray and numpy giving different answers ? > I have a little insight as to what is going on here but no fix. numarray has two versions of dot(): 1. The original dot()

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Travis Oliphant
Victoria G. Laidler wrote: > I'm a numarray user that relies on convolve. Thanks for voicing your opinion. We should be clear about what we are talking about. 1) There is already a convolve in NumPy (it's the same one that was in Numeric). It seems the one in numarray is compatible. I'm tal

Re: [Numpy-discussion] [SciPy-user] updated Ubuntu Dapper packages for numpy, matplotlib, and scipy online

2006-07-18 Thread Michael Williams
On Tue, Jul 18, 2006 at 11:45:32AM -0700, Andrew Straw wrote: >>I am unable to access these repositories (which sound very useful, and >>for which I am grateful to Andrew!). > >Hmm, that looks like DNS error. My repository is still up and online... It is indeed a DNS error. I should have tested f

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Travis Oliphant
Perry Greenfield wrote: > > On Jul 18, 2006, at 2:50 PM, Travis Oliphant wrote: > >> >> I'd like to get suggestions about what to do about the remaining >> numarray extension modules that are not addressed in NumPy (convolve, >> image, nd_image). There will be people coming from numarray that w

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Victoria G. Laidler
I'm a numarray user that relies on convolve. I would hope that one of the criteria by which to make such decisions is "make the transition for numarray and numeric users as painless as possible". Changing namespaces and introducing additional dependencies is not painless. Thus unless there is a

Re: [Numpy-discussion] Beta release on Thursday

2006-07-18 Thread Travis Oliphant
Sven Schreiber wrote: >Travis Oliphant schrieb: > > >>I'd like to make release 1.0beta on Thursday. Please submit bug-reports >>and fixes before then. >> >> >> > >Just two things I noticed: > > Thanks for commenting > > import numpy as n >import dft -> failed: m

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Pierre Barbier de Reuille
Sebastian Haase wrote: > I'm using nd_image extensively. Considering that SciPy seem to install much > easier these days than I remember I would be just happy to put them in to > SciPy. > Well, what is the content of nd_image and image, compared to scipy.ndimage ? > Some numarray people pref

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Perry Greenfield
On Jul 18, 2006, at 2:50 PM, Travis Oliphant wrote: > > I'd like to get suggestions about what to do about the remaining > numarray extension modules that are not addressed in NumPy (convolve, > image, nd_image). There will be people coming from numarray that > will > be using these modules.

[Numpy-discussion] A bunch of tickets

2006-07-18 Thread Filip Wasilewski
Hi, I have posted this mail from my google account a while ago, but it obviously was blocked by sourceforge. What about that proposal of moving numpy-discussion to scipy host? Anyway, I have been recently working with arrays of objects and noticed some problems. Here are the tickets: Array impr

Re: [Numpy-discussion] Beta release on Thursday

2006-07-18 Thread Sven Schreiber
Travis Oliphant schrieb: > I'd like to make release 1.0beta on Thursday. Please submit bug-reports > and fixes before then. > Just two things I noticed: >>> import numpy as n import dft -> failed: module compiled against version 90709 of C-API but this version of numpy is 9090d >>> n.__versio

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Perry Greenfield
On Jul 18, 2006, at 3:22 PM, Travis Oliphant wrote: > Robert Kern wrote: >> Travis Oliphant wrote: >> >>> I'd like to get suggestions about what to do about the remaining >>> numarray extension modules that are not addressed in NumPy >>> (convolve, >>> image, nd_image). There will be people c

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Nick Fotopoulos
Travis wrote: > Of course, my opinion is that they should not have been placed in > Numarray to begin with as the fit better as modules in SciPy. Can we not put them into SciPy now? Nick - Take Surveys. Earn Cash. Influenc

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Sebastian Haase
I'm using nd_image extensively. Considering that SciPy seem to install much easier these days than I remember I would be just happy to put them in to SciPy. Some numarray people prefer a transitional "special place". I remember that there was a discussion maybe a year ago of making SciPy so m

[Numpy-discussion] A bunch of tickets

2006-07-18 Thread Filip Wasilewski
Hi, I have been recently working with arrays of objects and noticed some problems. Here are the tickets: Array improperly created from numpy.poly1d object: http://projects.scipy.org/scipy/numpy/ticket/185 Can't create matrix of dtype=object directly from list (problem of ndarray.__new__): http:/

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Travis Oliphant
Robert Kern wrote: > Travis Oliphant wrote: > >> I'd like to get suggestions about what to do about the remaining >> numarray extension modules that are not addressed in NumPy (convolve, >> image, nd_image). There will be people coming from numarray that will >> be using these modules. >> >

Re: [Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Robert Kern
Travis Oliphant wrote: > I'd like to get suggestions about what to do about the remaining > numarray extension modules that are not addressed in NumPy (convolve, > image, nd_image). There will be people coming from numarray that will > be using these modules. > > Of course, my opinion is that

[Numpy-discussion] What to do about numarray extension modules?

2006-07-18 Thread Travis Oliphant
I'd like to get suggestions about what to do about the remaining numarray extension modules that are not addressed in NumPy (convolve, image, nd_image). There will be people coming from numarray that will be using these modules. Of course, my opinion is that they should not have been placed

Re: [Numpy-discussion] updated Ubuntu Dapper packages for numpy, matplotlib, and scipy online

2006-07-18 Thread Andrew Straw
Michael Williams wrote: >>Hi Andrew (and others), >> >>On Mon, Jun 19, 2006 at 09:32:44AM -0700, Andrew Straw wrote: >> >> > > I have updated the apt repository I maintain for Ubuntu's Dapper, which now includes: numpy matplotlib scipy Each package is from a

Re: [Numpy-discussion] A Different Arithmetic Error: +=

2006-07-18 Thread Sasha
On 7/18/06, Alan G Isaac <[EMAIL PROTECTED]> wrote: > it cannot upcast, as the '+=' operation will use only the > memory initially allocated for a. Not true: >>> x = [2,3] >>> x += array(2) >>> type(x) This is just the design choice made by numpy. I don't see the need for an error. Augmented

Re: [Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Fernando Perez
On 7/18/06, Tim Hochberg <[EMAIL PROTECTED]> wrote: > Eric Emsellem wrote: > > thanks for the tips. (indeed your "add.reduce" is correct: I just wrote > > this down too quickly, in the script I have a "sum" included). > > > > And yes you are right for the memory issue, so I may just keep the loop >

Re: [Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Robert Kern
Tim Hochberg wrote: > I just wanted to add that there are faster, but considerably complicated > ways to attack this class of problems. The one I've looked at in the > past was the fast multipole method and I believe there are others. I'm > not sure whether these can be implemented efficiently i

Re: [Numpy-discussion] updated Ubuntu Dapper packages for numpy, matplotlib, and scipy online

2006-07-18 Thread Michael Williams
Hi Andrew (and others), On Mon, Jun 19, 2006 at 09:32:44AM -0700, Andrew Straw wrote: >I have updated the apt repository I maintain for Ubuntu's Dapper, which >now includes: > >numpy >matplotlib >scipy > >Each package is from a recent SVN checkout and should thus be regarded >as "bleeding edge". T

Re: [Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Sasha
On 7/18/06, Eric Emsellem <[EMAIL PROTECTED]> wrote: [...] > (is "sum" different than "add.reduce"?) "sum" is a wrapper around ndarray.sum method, while add.reduce is a ufunc method. At the C level they are the same, but "sum" may be a little slower for the small arrays. > python -m timeit -s "f

Re: [Numpy-discussion] Cannot build numpy svn on Windows

2006-07-18 Thread Thomas Heller
Albert Strasheim schrieb: > Hello all > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:numpy- >> [EMAIL PROTECTED] On Behalf Of Keith Goodman >> Sent: 18 July 2006 15:55 >> To: Thomas Heller >> Cc: numpy-discussion@lists.sourceforge.net >> Subject: Re: [Numpy-discussion] Cannot b

Re: [Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Tim Hochberg
Eric Emsellem wrote: > thanks for the tips. (indeed your "add.reduce" is correct: I just wrote > this down too quickly, in the script I have a "sum" included). > > And yes you are right for the memory issue, so I may just keep the loop > in and try to make it work on a fast PC...(or use parallel pr

Re: [Numpy-discussion] Cannot build numpy svn on Windows

2006-07-18 Thread Albert Strasheim
Hello all > -Original Message- > From: [EMAIL PROTECTED] [mailto:numpy- > [EMAIL PROTECTED] On Behalf Of Keith Goodman > Sent: 18 July 2006 15:55 > To: Thomas Heller > Cc: numpy-discussion@lists.sourceforge.net > Subject: Re: [Numpy-discussion] Cannot build numpy svn on Windows > > On 7/1

Re: [Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Eric Emsellem
thanks for the tips. (indeed your "add.reduce" is correct: I just wrote this down too quickly, in the script I have a "sum" included). And yes you are right for the memory issue, so I may just keep the loop in and try to make it work on a fast PC...(or use parallel processes) (is "sum" different

Re: [Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Perry Greenfield
On Jul 18, 2006, at 10:23 AM, Eric Emsellem wrote: > Hi, > > I have a specific quantity to derive from an array, and I am at the > moment unable to do it for a too large array because it just takes too > long! So I am looking for an advice on how to efficiently compute > such a > quantity: > >

Re: [Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Bill Baxter
Maybe this will help -- it computes the squared distances between a bunch of points: def dist2(x,c): """ Calculates squared distance between two sets of points. n2 = dist2(x, c) D = DIST2(X, C) takes two matrices of vectors and calculates the squared Euclidean distance between

[Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Eric Emsellem
Hi, I have a specific quantity to derive from an array, and I am at the moment unable to do it for a too large array because it just takes too long! So I am looking for an advice on how to efficiently compute such a quantity: I have 3 arrays of N floats (x[...], y[..], z[..]) and I wish to do: r

Re: [Numpy-discussion] Cannot build numpy svn on Windows

2006-07-18 Thread Keith Goodman
On 7/18/06, Thomas Heller <[EMAIL PROTECTED]> wrote: > When I change this line in the generated config.h file: > > #define NPY_ALLOW_THREADS WITH_THREAD > > to this one: > > #define NPY_ALLOW_THREADS 1 > > then I can build. What part of numpy is threaded?

Re: [Numpy-discussion] Advice for grouping recarrays

2006-07-18 Thread Tom Denniston
I suggest lexsort itertools.groupby of the indices take I think it would be really great if numpy had the first two as a function or something like that. It is really useful to be able to take an array and bucket it and apply further numpy operations like accumulation functions. On 7/18/06, Ste

[Numpy-discussion] Advice for grouping recarrays

2006-07-18 Thread Stephen Simmons
Hi, Does anyone have any suggestions for summarising data in numpy? The quick description is that I want to do something like the SQL statement: SELECT sum(field1), sum(field2) FROM table GROUP BY field3; The more accurate description is that my data is stored in PyTables HDF format, with

Re: [Numpy-discussion] numpy.vectorize performance

2006-07-18 Thread Gary Ruben
Nick Fotopoulos wrote: > I've been looking over the wiki and am not sure where the best place > would be for such a snippet. Would it go with the numpy examples > under vectorize or perhaps in a cookbook somewhere? Yes. It seems to me like a cookbook example. In the utopian future, when ther

Re: [Numpy-discussion] numarray bug: dot product between 2x2 and 3x2x3 on Mac different from PC

2006-07-18 Thread Travis Oliphant
Sebastian Haase wrote: > On Monday 17 July 2006 12:38, Travis Oliphant wrote: > > Any idea on my main question ? > What is the dot product of a 2x2 and 3x2x3 supposed to look like ? > Why are numarray and numpy giving different answers ?? > I'm pretty sure the dot-product in Numeric (and I g

[Numpy-discussion] Cannot build numpy svn on Windows

2006-07-18 Thread Thomas Heller
Building numpy from svn on Windows with Python 2.4.3 fails: c:\svn\numpy\numpy\core\include\numpy\arrayobject.h(986) : fatal error C1017: invalid integer constant expression When I change this line in the generated config.h file: #define NPY_ALLOW_THREADS WITH_THREAD to this one: #define NPY_

Re: [Numpy-discussion] A Different Arithmetic Error: +=

2006-07-18 Thread Alan G Isaac
On Mon, 17 Jul 2006, John Lawless apparently wrote: from scipy import * a = array((1.2)) a += 1.3j a > array(1.2) > Shouldn't this generate either an error or an up-cast, rather than > silently discarding the imaginary part? As I understand it: it cannot upcast, as the '+=' ope

Re: [Numpy-discussion] Speed degression?

2006-07-18 Thread Steffen Loeck
> I also placed in hooks so you can replace the scalarmath (for int, > float, and complex) with the Python version of math (this works because > the int, float, and complex scalars are sub-classes of the corresponding > Python object). Just for completeness some more tests using pythonmath/scalar