[Numpy-discussion] Installing numpy under cygwin

2009-11-18 Thread Olivia Cheronet
Hello. I am currently trying to install the latest version of NumPy for my cygwin Python, and I am having problems... I have downloaded the source, and unzipped and untarred it in my home directory. Subsequently, I included the following in the site.cfg file: [DEFAULT] library_dirs =

Re: [Numpy-discussion] failure building trunk with mingw

2009-11-18 Thread David Cournapeau
On Wed, Nov 18, 2009 at 12:38 AM, josef.p...@gmail.com wrote: Now numpy builds without problems. When I run the tests I get 16 failures mostly nan related. I have no idea whether they are real or if there is still something screwed up in my setup. See below. I can reproduce those. I did

Re: [Numpy-discussion] Installing numpy under cygwin

2009-11-18 Thread David Cournapeau
Olivia Cheronet wrote: Hello. I am currently trying to install the latest version of NumPy for my cygwin Python, and I am having problems... I have downloaded the source, and unzipped and untarred it in my home directory. Subsequently, I included the following in the site.cfg file:

Re: [Numpy-discussion] REMINDER: trunk is about to be frozen for 1.4.0

2009-11-18 Thread Darren Dale
On Tue, Nov 17, 2009 at 8:55 PM, David Cournapeau courn...@gmail.com wrote: already done  in r7743 :) Did you report it as a bug on trac, so that I close it as well, Oh, thanks! No, I forgot to report it on trac, I'll try to remember that in the future.

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-18 Thread René Dudfield
On Fri, Nov 6, 2009 at 7:46 PM, David Cournapeau courn...@gmail.com wrote: On Sat, Nov 7, 2009 at 3:41 AM, David Cournapeau courn...@gmail.com wrote: I don't think LGPL has much meaning for python code, especially pure python code (and m4 for that matter) This is funny - besides pyqt, the

Re: [Numpy-discussion] Unexpected attribute error

2009-11-18 Thread James Bergstra
On Tue, Nov 17, 2009 at 9:53 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Nov 17, 2009 at 20:48, James Bergstra bergs...@iro.umontreal.ca wrote: Is it by design that  numpy.sqrt(None) raises an AttributeError: sqrt? Yes. numpy.sqrt() is a ufunc. Ufuncs take their arguments and try to

Re: [Numpy-discussion] Unexpected attribute error

2009-11-18 Thread Charles R Harris
On Wed, Nov 18, 2009 at 10:17 AM, James Bergstra bergs...@iro.umontreal.cawrote: On Tue, Nov 17, 2009 at 9:53 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Nov 17, 2009 at 20:48, James Bergstra bergs...@iro.umontreal.ca wrote: Is it by design that numpy.sqrt(None) raises an

Re: [Numpy-discussion] Installing numpy under cygwin

2009-11-18 Thread Olivia Cheronet
Hi, I have started again, simply executing: python setup.py install However, I now get the following: File numpy/core/setup.py, line 253, in check_mathlib raise EnvironmentError(math library missing; rerun EnvironmentError: math library missing; rerun setup.py after setting the MATHLIB env

[Numpy-discussion] combinatorial operations on a pair of arrays

2009-11-18 Thread Damien Moore
The title of this e-mail is probably misleading so let me just show some code: from numpy import * A=array([[1,2],[2,3],[3,4]]) B=array([[2,2],[3,3]]) C=zeros(A.shape) for i in xrange(len(A)): C[i]=sum(A[i]**B) print C What I want to do is eliminate the for loop and rely on numpy internals,

Re: [Numpy-discussion] combinatorial operations on a pair of arrays

2009-11-18 Thread Damien Moore
ugh... I goofed. The code snippet should have read from numpy import * A=array([[1,2],[2,3],[3,4]]) B=array([[2,2],[3,3]]) C=zeros(A.shape) for i in xrange(len(A)): C[i]=(A[i]**B).sum(0) print C On Wed, Nov 18, 2009 at 2:17 PM, Damien Moore damienlmo...@gmail.com wrote: The title of this

Re: [Numpy-discussion] combinatorial operations on a pair of arrays

2009-11-18 Thread Emmanuelle Gouillart
Hello Damien, broadcasting can solve your problem (see http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html): (A[np.newaxis,:]**B[:,np.newaxis]).sum(axis=0) gives the result you want. (assuming import numpy as np, which is considered as a better practice as from numpy import *)

Re: [Numpy-discussion] combinatorial operations on a pair of arrays

2009-11-18 Thread Damien Moore
Emanuelle, perfect! thanks. (assuming import numpy as np, which is considered as a better practice as from numpy import *) actually I normally just import numpy but I guess np is nicer to type and read... cheers, Damien ___ NumPy-Discussion mailing

[Numpy-discussion] lstsq illegal instruction

2009-11-18 Thread Angus McMorland
Hi all, Whenever I run numpy.linalg.lstsq with a xs parameter with both dimensions larger than 128, I get an Illegal instruction and python dies completely. It happens with both the Ubuntu jaunty standard numpy 1.2.1, and a recent svn 1.4.0.dev7727, but it doesn't seem to happen on any other

Re: [Numpy-discussion] lstsq illegal instruction

2009-11-18 Thread Robert Kern
On Wed, Nov 18, 2009 at 15:15, Angus McMorland amcm...@gmail.com wrote: Hi all, Whenever I run numpy.linalg.lstsq with a xs parameter with both dimensions larger than 128, I get an Illegal instruction and python dies completely. It happens with both the Ubuntu jaunty standard numpy 1.2.1,

[Numpy-discussion] matplotlib and numpy cause MemoryError

2009-11-18 Thread Mathew Yeates
Hi I have a line of matplotlib code -self.ax.plot(plot_data,mif) that causes the line -self.data=numpy.zeros(shape=dims) to throw a MemoryError exception. (if I comment out the first line I get no error.) This is on a windows xp machine with latest numpy and the latest matplotlib. I

Re: [Numpy-discussion] matplotlib and numpy cause MemoryError

2009-11-18 Thread Robert Kern
On Wed, Nov 18, 2009 at 15:48, Mathew Yeates mat.yea...@gmail.com wrote: Hi I have a line of matplotlib code -self.ax.plot(plot_data,mif) that causes the line -self.data=numpy.zeros(shape=dims) to throw a MemoryError exception. (if I comment out the first line I get no error.)

Re: [Numpy-discussion] lstsq illegal instruction

2009-11-18 Thread Angus McMorland
2009/11/18 Robert Kern robert.k...@gmail.com: On Wed, Nov 18, 2009 at 15:15, Angus McMorland amcm...@gmail.com wrote: Hi all, Whenever I run numpy.linalg.lstsq with a xs parameter with both dimensions larger than 128, I get an Illegal instruction and python dies completely. It happens with

Re: [Numpy-discussion] matplotlib and numpy cause MemoryError

2009-11-18 Thread Mathew Yeates
The value of dims is constant and not particularly large. I also checked to make sure I wasn't running out of memory. Are there other reasons for this error? Mathew On Wed, Nov 18, 2009 at 1:51 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, Nov 18, 2009 at 15:48, Mathew Yeates

Re: [Numpy-discussion] matplotlib and numpy cause MemoryError

2009-11-18 Thread Mathew Yeates
also, the exception is only thrown when I plot something first. I wonder if matplotlib is messing something up. On Wed, Nov 18, 2009 at 2:13 PM, Mathew Yeates mat.yea...@gmail.com wrote: The value of dims is constant and not particularly large. I also checked to make sure I wasn't running out

Re: [Numpy-discussion] matplotlib and numpy cause MemoryError

2009-11-18 Thread Charles R Harris
On Wed, Nov 18, 2009 at 3:13 PM, Mathew Yeates mat.yea...@gmail.com wrote: The value of dims is constant and not particularly large. Yes, but what are they? I also checked to make sure I wasn't running out of memory. Are there other reasons for this error? If there is a memory error, no

Re: [Numpy-discussion] matplotlib and numpy cause MemoryError

2009-11-18 Thread Mathew Yeates
I turns out I *was* running out of memory. My dimensions would require 3.5 gig and my plot must have used up some memory. On Wed, Nov 18, 2009 at 2:43 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Nov 18, 2009 at 3:13 PM, Mathew Yeates mat.yea...@gmail.comwrote: The

[Numpy-discussion] memmap limits

2009-11-18 Thread Mathew Yeates
What limits are there on file size when using memmap? -Mathew ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] memmap limits

2009-11-18 Thread Robert Kern
On Wed, Nov 18, 2009 at 17:43, Mathew Yeates mat.yea...@gmail.com wrote: What limits are there on file size when using memmap? With a modern filesystem, usually you are only limited to the amount of contiguous free space in your process's current address space. -- Robert Kern I have come to

Re: [Numpy-discussion] memmap limits

2009-11-18 Thread Mathew Yeates
for a 64 bit machine does this mean I am limited to 4 GB? -Mathew On Wed, Nov 18, 2009 at 3:48 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, Nov 18, 2009 at 17:43, Mathew Yeates mat.yea...@gmail.com wrote: What limits are there on file size when using memmap? With a modern

Re: [Numpy-discussion] memmap limits

2009-11-18 Thread Robert Kern
On Wed, Nov 18, 2009 at 17:50, Mathew Yeates mat.yea...@gmail.com wrote: for a 64 bit machine does this mean I am limited to 4 GB? It depends not just on what your CPU is capable of, but also your OS and how your Python was built. If all three of those are 64-bit capable, you should be able to

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-18 Thread David Cournapeau
René Dudfield wrote: pygame is also LGPL... as are a number of other libraries. (pyqt is GPL btw). LGPL basically means you can link to the library source, but if you make changes to the library you should give them back. Users should also be able to change the library if they want...

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-18 Thread Robert Kern
On Wed, Nov 18, 2009 at 22:52, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: René Dudfield wrote: pygame is also LGPL... as are a number of other libraries.  (pyqt is GPL btw). LGPL basically means you can link to the library source, but if you make changes to the library you should

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-18 Thread David Cournapeau
Robert Kern wrote: On Wed, Nov 18, 2009 at 22:52, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: René Dudfield wrote: pygame is also LGPL... as are a number of other libraries. (pyqt is GPL btw). LGPL basically means you can link to the library source, but if you make

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-18 Thread Robert Kern
On Wed, Nov 18, 2009 at 23:39, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robert Kern wrote: On Wed, Nov 18, 2009 at 22:52, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: René Dudfield wrote: pygame is also LGPL... as are a number of other libraries.  (pyqt is GPL btw).