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
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
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
, 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.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
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
I do this
Regards
Ludwig
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion