Re: [Numpy-discussion] python eats memory like the cookie monster eats cookies

2007-02-04 Thread Robert Kern
Niels Provos wrote: > Good morning, > > not sure if I got the right list, but I hope that somebody here will > be able to shed some light on a Python-related memory problem. The > following code eats over >2GB of memory and fails with MemoyError > after just a few iterations. Here is a minimal e

Re: [Numpy-discussion] r3530 breaks nan_to_num for complex64 arrays

2007-02-04 Thread Tim Leslie
On 2/5/07, Tim Leslie <[EMAIL PROTECTED]> wrote: > Hi All, > > As of svn revision 3530 N.nan_to_num no longer works for arrays of > complex64. The actual error is raised in the signbit function, but I'm > not sure why this is failing. If someone has a quick fix for this > that'd be great, if not I'

Re: [Numpy-discussion] Please help with subclassing numpy.ndarray

2007-02-04 Thread Pierre GM
On Sunday 04 February 2007 20:22:44 Jeremy Conlin wrote: > I have subclassed the numpy.ndarray object, but need some help setting > some attributes. I have read http://scipy.org/Subclasses but it > doesn't provide the answer I am looking for. Actually, yes: In the example given in http://scipy.or

Re: [Numpy-discussion] numpy.matlib.abs

2007-02-04 Thread Keith Goodman
On 2/4/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Keith Goodman wrote: > > There's a numpy.abs but no numpy.matlib.abs. > > > >>> import numpy as N > >>> import numpy.matlib as M > >>> > >>> N.abs? > > Type: ufunc > > Base Class: > > String Form: > > Namespace: Interactive

[Numpy-discussion] Please help with subclassing numpy.ndarray

2007-02-04 Thread Jeremy Conlin
I have subclassed the numpy.ndarray object, but need some help setting some attributes. I have read http://scipy.org/Subclasses but it doesn't provide the answer I am looking for. I create an instance of the class in my __new__ method as: import numpy class MyClass(numpy.ndarray): __new__(self,

Re: [Numpy-discussion] numpy.matlib.abs

2007-02-04 Thread Robert Kern
Keith Goodman wrote: > There's a numpy.abs but no numpy.matlib.abs. > >>> import numpy as N >>> import numpy.matlib as M >>> >>> N.abs? > Type: ufunc > Base Class: > String Form: > Namespace: Interactive > Docstring: > y = absolute(x) takes |x| elementwise. > >>> M.abs

[Numpy-discussion] numpy.matlib.abs

2007-02-04 Thread Keith Goodman
There's a numpy.abs but no numpy.matlib.abs. >> import numpy as N >> import numpy.matlib as M >> >> N.abs? Type: ufunc Base Class: String Form: Namespace: Interactive Docstring: y = absolute(x) takes |x| elementwise. >> M.abs? Object `M.abs` not found.

Re: [Numpy-discussion] python eats memory like the cookie monster eats cookies

2007-02-04 Thread Robert Kern
Sebastian Haase wrote: > Is there *any* support for old Numeric on this list !? Not unless if you are offering some. > Maybe it should be officially stated that the one way to go is > numpy > and that problems with Numeric ( or numarray ) can only be noticed but > will likely not get fixed T

Re: [Numpy-discussion] python eats memory like the cookie monster eats cookies

2007-02-04 Thread Sebastian Haase
On 2/4/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Niels Provos wrote: > > The missing imports are > > > > import Numeric # for zeros and ones > > from scipy.fftpack import fft2,ifft2 > > > > Curiously, replacing Numeric.zeros with scipy.zeros makes the problem > > go away. Why? > > Possibly a bu

[Numpy-discussion] numpy.tests() FAILED (errors=3)

2007-02-04 Thread Xavier Gnata
Hi, I'm using numpy svn and running numpy.test(). The error log is the following : == ERROR: check_complex_bad (numpy.lib.tests.test_type_check.test_nan_to_num) ---

Re: [Numpy-discussion] python eats memory like the cookie monster eats cookies

2007-02-04 Thread Robert Kern
Niels Provos wrote: > The missing imports are > > import Numeric # for zeros and ones > from scipy.fftpack import fft2,ifft2 > > Curiously, replacing Numeric.zeros with scipy.zeros makes the problem > go away. Why? Possibly a bug in Numeric. -- Robert Kern "I have come to believe that the wh

Re: [Numpy-discussion] python eats memory like the cookie monster eats cookies

2007-02-04 Thread Niels Provos
The missing imports are import Numeric # for zeros and ones from scipy.fftpack import fft2,ifft2 Curiously, replacing Numeric.zeros with scipy.zeros makes the problem go away. Why? Thank you, Niels. On 2/4/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Niels Provos wrote: > > Good morning, > >

Re: [Numpy-discussion] python eats memory like the cookie monster eats cookies

2007-02-04 Thread Robert Kern
Niels Provos wrote: > Good morning, > > not sure if I got the right list, but I hope that somebody here will > be able to shed some light on a Python-related memory problem. The > following code eats over >2GB of memory and fails with MemoyError > after just a few iterations. > > def ZeroPadData

Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-04 Thread Keith Goodman
On 2/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > On 2/3/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > Stephen Simmons wrote: > > > > > The question though is whether all of the inner loop's overhead is > > > necessary. > > > My counterexample using numpy.dot() suggests there's considerable

Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-04 Thread Sebastian Haase
On 2/3/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Stephen Simmons wrote: > > > The question though is whether all of the inner loop's overhead is > > necessary. > > My counterexample using numpy.dot() suggests there's considerable scope > > for improvement, at least for certain common cases. > >

[Numpy-discussion] python eats memory like the cookie monster eats cookies

2007-02-04 Thread Niels Provos
Good morning, not sure if I got the right list, but I hope that somebody here will be able to shed some light on a Python-related memory problem. The following code eats over >2GB of memory and fails with MemoyError after just a few iterations. def ZeroPadData(A, shape): a = Numeric.zeros(sh