[Numpy-discussion] MemoryError with dot(A, A.T) where A is 800MB on 32-bit Vista

2010-06-09 Thread greg whittier
When I run import numpy as np a = np.ones((400, 50), dtype=np.float32) c = np.dot(a, a.T) produces a MemoryError on the 32-bit Enthought Python Distribution on 32-bit Vista. I understand this has to do with the 2GB limit with 32-bit python and the fact numpy wants a contiguous chunk of

Re: [Numpy-discussion] MemoryError with dot(A, A.T) where A is 800MB on 32-bit Vista

2010-06-09 Thread V. Armando Solé
greg whittier wrote: When I run import numpy as np a = np.ones((400, 50), dtype=np.float32) c = np.dot(a, a.T) produces a MemoryError on the 32-bit Enthought Python Distribution on 32-bit Vista. I understand this has to do with the 2GB limit with 32-bit python and the fact numpy

Re: [Numpy-discussion] MemoryError with dot(A, A.T) where A is 800MB on 32-bit Vista

2010-06-09 Thread greg whittier
On Wed, Jun 9, 2010 at 12:57 PM, V. Armando Solé s...@esrf.fr wrote: greg whittier wrote: a = np.ones((400, 50), dtype=np.float32) c = np.dot(a, a.T) In such cases I create a matrix of zeros with the final size and I fill it with a loop of dot products of smaller chunks of the original

Re: [Numpy-discussion] MemoryError with dot(A, A.T) where A is 800MB on 32-bit Vista

2010-06-09 Thread Alan G Isaac
On 6/9/2010 12:49 PM, greg whittier wrote: Is there a way to do A*A.T without two copies of A? Does this do what you want? Alan Isaac a array([[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]]) np.tensordot(a,a,axes=(-1,-1)) array([[ 1, 3, 5, 7, 9], [

Re: [Numpy-discussion] MemoryError with dot(A, A.T) where A is 800MB on 32-bit Vista

2010-06-09 Thread Xavier Saint-Mleux
Alan G Isaac wrote: On 6/9/2010 12:49 PM, greg whittier wrote: Is there a way to do A*A.T without two copies of A? Does this do what you want? Alan Isaac a array([[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]])

Re: [Numpy-discussion] MemoryError with dot(A, A.T) where A is 800MB on 32-bit Vista

2010-06-09 Thread greg whittier
On Wed, Jun 9, 2010 at 1:16 PM, Alan G Isaac ais...@american.edu wrote: On 6/9/2010 12:49 PM, greg whittier wrote: Is there a way to do A*A.T without two copies of A? Does this do what you want? Alan Isaac np.tensordot(a,a,axes=(-1,-1)) This seems to suffer from the same problem. A