Closed
Description
import numpy as np
from pandas import Series
a = [np.nan, 1]
b = [np.inf, 1]
print Series(a).sum() #1
print Series(b).sum() #2
print np.sum(a) #3
print np.sum(b) #4
I understand that pandas has made the design decision that sums with nans will drop nans (#1), but why is infinity dropped in the same way? I don't see why np.inf + 5 could reasonably be 5. numpy returns np.inf in this case.
Metadata
Metadata
Assignees
Labels
No labels