[Numpy-discussion] New functions.
Wed Jun 1 12:36:30 CDT 2011
On Wed, Jun 1, 2011 at 12:30, Christopher Barker <Chris.Barker@noaa.gov> wrote:
> On 5/31/11 6:08 PM, Charles R Harris wrote:
>> 2) Ufunc fadd (nanadd?) Treats nan as zero in addition.
> In : a
> Out: array([ 1., 2., nan])
> In : b
> Out: array([0, 1, 2])
> In : a + b
> Out: array([ 1., 3., nan])
> and nanadd(a,b) would yield:
> array([ 1., 3., 2.)
> I don't see how that is particularly useful, at least not any more
> useful that nanprod, nandiv, etc, etc...
> What am I missing?
It's mostly useful for its .reduce() and .accumulate() form.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion