Re: [Numpy-discussion] sum of positive values in an array

2008-09-05 Thread Ludwig
What are the relative merits of sum(a[where(a>0]) to a[a > 0].sum() ? Second one is more OO, takes a few keystrokes less to type. Is there any real difference if it came to very large arrays? Or is it 'just' a style question? Ludwig 2008/9/5 Zachary Pincus <[EMAIL PROT

[Numpy-discussion] Numpy random: independent streams

2008-08-06 Thread Ludwig
same sequence. Is there an equivalent for this in numpy? (Apart from, as it seems, the oldnumeric package http://numpy.scipy.org/numpydoc/numpy-20.html)? Ludwig ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org

[Numpy-discussion] Downsampling array, retaining min and max values in window

2007-07-28 Thread Ludwig M Brinckmann
my results. What is the best way to do this? Regards Ludwig ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Bug with MA and reduce?

2007-07-27 Thread Ludwig M Brinckmann
, a value that is not in the array. I am using Python 2.44 on XP, the maskedarray is the svn latest, the numpy.core.ma was 1.0.2, but I have tested it with only the current svn version of ma.py and it produces the wrong output. Ludwig On 27/07/07, Ludwig M Brinckmann <[EMAIL PROTECTED]>

[Numpy-discussion] Bug with MA and reduce?

2007-07-27 Thread Ludwig M Brinckmann
= numpy.ma.make_mask_none(data.shape) mask[data == -999] = True ma = numpy.ma.MaskedArray(data, mask = mask) min = numpy.ma.minimum.reduce(ma,0) print min Am I doing something really stupid here? Ludwig ___ Numpy-discussion mailing list Numpy-discussion

[Numpy-discussion] Downsampling a 2D array with min/max and nullvalues

2007-07-26 Thread Ludwig M Brinckmann
should be set to the null value. Any suggestions? Ludwig ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Complex 'where' expression

2007-03-27 Thread Ludwig
I do this Regards Ludwig ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion