Re: [Numpy-discussion] Memory leak in array protocol numarray<--numpy

2006-08-12 Thread Todd Miller
Travis Oliphant wrote: > As far as numpy knows this is all it's supposed to do. This seems to > indicate that something is going on inside numarray.array(a) > > because once you had that line to the loop, memory consumption shows up. > > In fact, you can just add the line > > a = _numarray._arra

Re: [Numpy-discussion] Memory leak in array protocol numarray<--numpy

2006-08-12 Thread Todd Miller
I agree with all of Travis' comments below and committed the suggested changes to numarray CVS. I found one other numarray change needed for Francesc's examples to run (apparently) leak-free: Py_INCREF(obj) Py_XDECREF(a->base) a->base = obj Py_DECREF(cobj) Thanks Travis! Regards, Todd Tra

Re: [Numpy-discussion] Memory leak in array protocol numarray <--numpy

2006-08-12 Thread Francesc Altet
A Dissabte 12 Agost 2006 14:37, Todd Miller va escriure: > I agree with all of Travis' comments below and committed the suggested > changes to numarray CVS. I found one other numarray change needed > for Francesc's examples to run (apparently) leak-free: > > Py_INCREF(obj) > Py_XDECREF(a->base)

[Numpy-discussion] build bug

2006-08-12 Thread John Hunter
Just tried to build svn 2999 on OSX 10.3 w/ python2.3 and encountered a bug in numpy/core/setup.py on line 102 if sys.version[:3] < '2.4': #kws_args['headers'].append('stdlib.h') if check_func('strtod'): moredefs.append(('PyOS_ascii_

Re: [Numpy-discussion] build bug

2006-08-12 Thread David M. Cooke
On Sat, Aug 12, 2006 at 11:27:07AM -0500, John Hunter wrote: > > Just tried to build svn 2999 on OSX 10.3 w/ python2.3 and encountered > a bug in numpy/core/setup.py on line 102 > > if sys.version[:3] < '2.4': > #kws_args['headers'].append('stdlib.h') >

Re: [Numpy-discussion] numpy.ascontiguousarray on byteswapped data !?

2006-08-12 Thread Travis Oliphant
Sebastian Haase wrote: > Travis Oliphant wrote: >> Sebastian Haase wrote: >>> Hi, >>> Does numpy.ascontiguousarray(arr) "fix" the byteorder when arr is >>> non-native byteorder ? >>> >>> If not, what functions does ? >>> >> >> It can if you pass in a data-type with the right byteorder (or use a

Re: [Numpy-discussion] why is default axis always different?

2006-08-12 Thread Sven Schreiber
Sven Schreiber schrieb: > Hi, > notice the (confusing, imho) different defaults for the axis of the > following related functions: > > nansum(a, axis=-1) > Sum the array over the given axis, treating NaNs as 0. > > sum(x, axis=None, dtype=None) > Sum the array over the given axis. The op