`float` is returned when the distance is `np.nan`. But perhaps `None` would be a less confusing stand-in for an undefined distance. See [thread](https://github.com/qLDPCOrg/qLDPC/pull/398#discussion_r2646383339).