{"id":24093,"library":"nanto","title":"nanto","description":"nanto makes working with values that might be NaN safer and easier. It provides utilities to detect, handle, and avoid NaN pitfalls. Current version: 0.1.1. Release cadence: irregular.","status":"active","version":"0.1.1","language":"python","source_language":"en","source_url":"https://github.com/mmore500/nanto","tags":["nan","sentinel","utilities","type-safety"],"install":[{"cmd":"pip install nanto","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":null,"symbol":"nan","correct":"from nanto import nan"},{"note":"","wrong":null,"symbol":"is_nan","correct":"from nanto import is_nan"},{"note":"","wrong":null,"symbol":"not_nan","correct":"from nanto import not_nan"},{"note":"","wrong":null,"symbol":"coalesce","correct":"from nanto import coalesce"},{"note":"","wrong":null,"symbol":"Equality","correct":"from nanto import Equality"}],"quickstart":{"code":"from nanto import nan, is_nan, not_nan, coalesce, Equality\n\n# Use nan as a sentinel value\nresult = nan\nprint(is_nan(result))  # True\nprint(not_nan(42))     # True\n\n# Coalesce: return first non-nan value\nvalue = coalesce(nan, nan, 5, nan)\nprint(value)  # 5\n\n# Use Equality enum for safe comparisons\nfrom nanto import Equality\nif Equality.NAN == Equality.NAN:\n    print(\"By convention, nan equals nan in nanto.\")","lang":"python","description":"Demonstrates basic usage of nanto: creating NaN sentinels, checking them, coalescing multiple values, and the Equality enum for NaN-safe comparisons."},"warnings":[{"fix":"Use 'is_nan(value)' instead of 'value is nan'.","message":"The 'nan' sentinel is a singleton, but using 'is' for comparison may be unreliable across imports. Always use 'is_nan()' or 'not_nan()' for checking NaN values.","severity":"gotcha","affected_versions":"all"},{"fix":"","message":"No deprecations known; library is early stage.","severity":"deprecated","affected_versions":"0.1.1"},{"fix":"","message":"No breaking changes known yet.","severity":"breaking","affected_versions":"0.1.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with 'pip install nanto' and use 'from nanto import nan'.","cause":"nanto not installed or wrong import path.","error":"ImportError: cannot import name 'nan' from 'nanto'"},{"fix":"Upgrade to latest version with 'pip install --upgrade nanto'.","cause":"Outdated version of nanto (coalesce added later?).","error":"AttributeError: module 'nanto' has no attribute 'coalesce'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}