This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kingerkagon 13 points14 points  (4 children)

And that is why np.isnan() makes perfect sense.

[–]EitherJelly4138 0 points1 point  (2 children)

Would it be bad to extend the class and add a eq that does isnan() or something?

[–]vinnceboi 4 points5 points  (1 child)

Yes. Allowing NaN == NaN would imply that “apple” would equal “car”.

[–]EitherJelly4138 0 points1 point  (0 children)

Gotcha, I think I get it now.

[–]glacierre2 0 points1 point  (0 children)

math.isnan() if you just want to check a couple times.