![](https://secure.gravatar.com/avatar/342bd0a61c7081db529c856d3bcd9545.jpg?s=120&d=mm&r=g)
On Tue, Sep 29, 2015 at 11:14 AM, Antoine Pitrou <solipsis@pitrou.net> wrote:
None for example? float('nan') may be a bit weird amongst e.g. an array of Decimals
The downside to `None` is that it's one more thing to check for and makes object arrays an even weirder edge case. (Incidentally, Decimal does have its own non-float NaN which throws a whole different wrench in the works. ` np.sign(Decimal('NaN'))` is going to raise an error no matter what.) A float (or numpy) NaN makes more sense to return for mixed datatypes than None does, in my opinion. At least then one can use `isfinite`, etc to check while `np.isfinite(None)` will raise an error. Furthermore, if there's at least one floating point NaN in the object array, getting a float NaN out makes sense. Just my $0.02, anyway.