On Tue, Sep 29, 2015 at 11:14 AM, Antoine Pitrou <solip...@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.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion