A larry of all NaNs does not return NaN for some methods

Bug #571830 reported by kwgoodman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
larry
Fix Committed
Low
kwgoodman

Bug Description

The following methods do not return NaN when the larry contains all NaNs: prod, cumprod, cumsum.

Current behavior:

>> la.larry([la.nan, la.nan]).prod()
   1.0
>> la.larry([la.nan, la.nan]).cumprod(axis=0)
label_0
    0
    1
x
array([ 1., 1.])
>> la.larry([la.nan, la.nan]).cumsum(axis=0)
label_0
    0
    1
x
array([ 0., 0.])

Desired behavior:

>> la.larry([la.nan, la.nan]).prod()
   NaN
>> la.larry([la.nan, la.nan]).cumprod(axis=0)
label_0
    0
    1
x
array([ NaN, NaN])
>> la.larry([la.nan, la.nan]).cumsum(axis=0)
label_0
    0
    1
x
array([ NaN, NaN])

Related branches

kwgoodman (kwgoodman)
Changed in larry:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → kwgoodman (kwgoodman)
milestone: none → 0.3
kwgoodman (kwgoodman)
Changed in larry:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.