Re: [Numpy-discussion] Supporting both NumPy and Numeric versions of amodule

2006-06-15 Thread Konrad Hinsen
> We are using Python's distutils, and I'm trying to figure out if > there's a way in which I can have both distributions installed to one > package directory, and then the __init__.py file would try to figure > out which one to import on behalf of the user (i.e. it would try to > figure out if the

Re: [Numpy-discussion] distance matrix speed

2006-06-15 Thread Johannes Loehnert
Hi, def dtest():     A = random( [4,2])     B = random( [1000,2]) # drawback: memory usage temporarily doubled # solution see below d = A[:, newaxis, :] - B[newaxis, :, :] # written as 3 expressions for more clarity d = sqrt((d**2).sum(axis=2)) return d def dtest_lowmem(

Re: [Numpy-discussion] distance matrix speed

2006-06-15 Thread Michael Sorich
Hi Sebastian, I am not sure if there is a function already defined in numpy, but something like this may be what you are after def distance(a1, a2): return sqrt(sum((a1[:,newaxis,:] - a2[newaxis,:,:])**2, axis=2)) The general idea is to avoid loops if you want the code to execute fast. I hop

[Numpy-discussion] distance matrix speed

2006-06-15 Thread Sebastian Beca
Hi, I'm working with NumPy/SciPy on some algorithms and i've run into some important speed differences wrt Matlab 7. I've narrowed the main speed problem down to the operation of finding the euclidean distance between two matrices that share one dimension rank (dist in Matlab): Python: def dtest()

Re: [Numpy-discussion] Don't like the short names like lstsq and irefft

2006-06-15 Thread David M. Cooke
On Wed, Jun 14, 2006 at 11:46:27PM -0400, Sasha wrote: > On 6/14/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > > After working with them for a while, I'm going to go on record and say that > > I > > prefer the long names from Numeric and numarray (like linear_least_squares, > > inverse_real_fft,

Re: [Numpy-discussion] deprecated function throwing readonly attribute

2006-06-15 Thread David M. Cooke
On Thu, Jun 15, 2006 at 09:39:58PM -0500, Ted Horst wrote: > The depreacted function in numpy.lib.utils is throwing a readonly > attribute exception in the latest svn (2627). This is on the Mac OSX > (10.4.6) using the builtin python (2.3.5) during the import of > fftpack. I'm guessing its

[Numpy-discussion] TEst post

2006-06-15 Thread Sebastian Beca
Test post. Something isn't working ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion

[Numpy-discussion] deprecated function throwing readonly attribute

2006-06-15 Thread Ted Horst
The depreacted function in numpy.lib.utils is throwing a readonly attribute exception in the latest svn (2627). This is on the Mac OSX (10.4.6) using the builtin python (2.3.5) during the import of fftpack. I'm guessing its a 2.3/2.4 difference. Ted _

Re: [Numpy-discussion] Supporting both NumPy and Numeric versions of a module

2006-06-15 Thread Andrew Straw
Dear Mary, I suggest using numpy and at the boundaries use numpy.asarray(yourinput), which will be a quick way to view the data as a numpy array, regardless of its original type. Otherwise, you could look at the matplotlib distribution to see how it's done to really support multiple array packages

Re: [Numpy-discussion] syntax for obtaining rank of two columns?

2006-06-15 Thread Simon Burton
On Thu, 15 Jun 2006 15:56:56 -0700 (PDT) JJ <[EMAIL PROTECTED]> wrote: > In matlab > the command is quite simple: > > rank([d(:,i),d(:,j)]) you could use the cauchy-schwartz inequality, which becomes an equality iff the rank above is 1: http://planetmath.org/encyclopedia/CauchySchwarzInequalit

Re: [Numpy-discussion] syntax for obtaining rank of two columns?

2006-06-15 Thread Tim Hochberg
JJ wrote: >Hello. I am a matlab user learning the syntax of >numpy. Id like to check that I am not missing some >easy steps on column selection and concatenation. The >example task is to determine if two columns selected >out of an array are of full rank (rank 2). Lets say >we have an array d

[Numpy-discussion] syntax for obtaining rank of two columns?

2006-06-15 Thread JJ
Hello. I am a matlab user learning the syntax of numpy. Id like to check that I am not missing some easy steps on column selection and concatenation. The example task is to determine if two columns selected out of an array are of full rank (rank 2). Lets say we have an array d that is size (10,

[Numpy-discussion] Supporting both NumPy and Numeric versions of a module

2006-06-15 Thread Mary Haley
Hi all, We are getting ready to release some Python software that supports both NumPy and Numeric. As we have it now, if somebody wanted to use our software with NumPY, they would have to download the binary distribution that was built with NumPy and install that. Otherwise, they have to downloa

Re: [Numpy-discussion] problem with numpy.. sometimes using numarray? and selection question

2006-06-15 Thread humufr
Just a guess, you're reading some fits file with pyfits but you didn't declare the variable NUMERIX for numpy (with the beta version of pyfits) or you script are calling another script who are using numarray. I had both problem last week. Pyfits with a mix of numarray/numpy and a script to read

Re: [Numpy-discussion] core dump when runniong tests

2006-06-15 Thread Mathew Yeates
SunOS 5.10 Generic_118844-20 i86pc i386 i86pcSystem = SunOS David M. Cooke wrote: > On Wed, 14 Jun 2006 14:06:13 -0700 > Mathew Yeates <[EMAIL PROTECTED]> wrote: > > >> Travis suggested I use svn and this worked! >> Thanks Travis! >> >> I'm now getting 1 test failure. I'd love to dot this 'i'

Re: [Numpy-discussion] problem with numpy.. sometimes using numarray? and selection question

2006-06-15 Thread bryce hendrix
We've had the same problem many times. There were a few causes: * Our clean scripts don't delete c++ files, so generated code was often not re-generated when we switched to numpy * Files to generate code had numeric arrays hardcoded * we were using numerix, and the env var was not set for pa

Re: [Numpy-discussion] problem with numpy.. sometimes using numarray? and selection question

2006-06-15 Thread Fernando Perez
On 6/15/06, Eric Emsellem <[EMAIL PROTECTED]> wrote: > Hi, > > I have written a number of small modules where I now systematically use > numpy. > > I have in principle used the latest versions of the different > array/Science modules (scipy, numpy, ..) but still at some point during > a selection,

Re: [Numpy-discussion] https access to svn.scipy.org

2006-06-15 Thread Glen W. Mabey
On Thu, Jun 15, 2006 at 12:02:42PM -0500, Jeff Strunk wrote: > svn over https works now. Thanks Jeff -- that solved my svn woes. Glen ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo

Re: [Numpy-discussion] https access to svn.scipy.org

2006-06-15 Thread Jeff Strunk
svn over https works now. Jeff Strunk IT Administrator Enthought, Inc On Thursday 15 June 2006 11:58 am, Jeff Strunk wrote: > Hi Glen, > > I'll see about enabling SSL for svn on svn.scipy.org. > > Jeff Strunk > IT Administrator > Enthought, Inc. > > On Thursday 15 June 2006 9:04 am, Glen W. Mabey

Re: [Numpy-discussion] https access to svn.scipy.org

2006-06-15 Thread Jeff Strunk
Hi Glen, I'll see about enabling SSL for svn on svn.scipy.org. Jeff Strunk IT Administrator Enthought, Inc. On Thursday 15 June 2006 9:04 am, Glen W. Mabey wrote: > Hello, > > I am attempting to use the svn versions of numpy and scipy, but > apparently (according to > http://www.sipfoundry.org/

[Numpy-discussion] https access to svn.scipy.org

2006-06-15 Thread Glen W. Mabey
Hello, I am attempting to use the svn versions of numpy and scipy, but apparently (according to http://www.sipfoundry.org/tools/svn-tips.html#proxy ) I am behind a less-than-agreeable web proxy, because I get $ svn co http://svn.scipy.org/svn/numpy/trunk numpy svn: REPORT request failed on '/

[Numpy-discussion] problem with numpy.. sometimes using numarray? and selection question

2006-06-15 Thread Eric Emsellem
Hi, I have written a number of small modules where I now systematically use numpy. I have in principle used the latest versions of the different array/Science modules (scipy, numpy, ..) but still at some point during a selection, it crashes on numpy because it seems that the array correspond to "

Re: [Numpy-discussion] Don't like the short names like lstsq and irefft

2006-06-15 Thread Sasha
On 6/15/06, Paul Dubois <[EMAIL PROTECTED]> wrote: > And yes, I think FFT is a name. (:-> Exception for that. There are more exceptions that Numeric is not taking advantage of: equal, less, greater, ... -> eq, lt, gt, ... inverse, generalized_inverse -> inv, pinv In my view it is more importan

Re: [Numpy-discussion] Don't like the short names like lstsq and irefft

2006-06-15 Thread Alexander Belopolsky
On 6/15/06, Paul Dubois <[EMAIL PROTECTED]> wrote: > And yes, I think FFT is a name. (:-> Exception for that. There are more exceptions that Numeric is not taking advantage of: equal, less, greater, ... -> eq, lt, gt, ... inverse, generalized_inverse -> inv, pinv In my view it is more importan

Re: [Numpy-discussion] numpy.test() fails on Redhat Enterprise and Solaris

2006-06-15 Thread Christopher Hanley
The last successful run was with revision 2613. However, revision 2624 appears to have corrected the problem on Solaris. Thanks, Chris Travis Oliphant wrote: > Christopher Hanley wrote: > >> The daily numpy build and tests I run have failed for revision 2617. >> Below is the error message

[Numpy-discussion] Disable linking against external libs

2006-06-15 Thread Damien Miller
Hi, What is the intended way to disable linking against installed libraries (blas, lapack, etc) in site.cfg? I know I can do: [blas] blah_libs = XXXnonexistXXX but that strikes me as less than elegant. FYI I want to do this to make package building deterministic; not varying based on what the p

Re: [Numpy-discussion] numpy segv on OpenBSD

2006-06-15 Thread Fernando Perez
On 6/15/06, Damien Miller <[EMAIL PROTECTED]> wrote: > David M. Cooke wrote: > > Can you update to the latest svn? We may have fixed it already: valgrind is > > showing up nothing for me. > > Ok, but dumb question: how do I check out the SVN trunk? Sourceforge > lists details for CVS only... (unles

Re: [Numpy-discussion] numpy segv on OpenBSD

2006-06-15 Thread Arnd Baecker
On Thu, 15 Jun 2006, Damien Miller wrote: > David M. Cooke wrote: > > Can you update to the latest svn? We may have fixed it already: valgrind is > > showing up nothing for me. > > Ok, but dumb question: how do I check out the SVN trunk? Sourceforge > lists details for CVS only... (unless I'm miss

Re: [Numpy-discussion] numpy segv on OpenBSD

2006-06-15 Thread Damien Miller
David M. Cooke wrote: > Can you update to the latest svn? We may have fixed it already: valgrind is > showing up nothing for me. Ok, but dumb question: how do I check out the SVN trunk? Sourceforge lists details for CVS only... (unless I'm missing something) -d _