Open m-mohr opened 11 months ago
and what should is_nan("a string")
or is_nan([1, 2, 3])
result in? False or throw an error?
An error because the data type would not be allowed any longer.
I'm not sure whether the proposed change is required, it just looks like the current implementations don't implement it correctly anyway.
Process ID: is_nan / is_numerical
Describe the issue: is_nan is a bit weird in that it also returns true for data types that are not numbers.
Proposed solution: Make is_nan be compliant with most other languages and only return True if the value is actual a float NaN.
The existing behavior could be inversed and be part of a new process is_numerical (returns true for all integers and floating point numbers except for NaN, false for NaN and all non-numerical data types).
Any opinions? @soxofaan @clausmichele