"RuntimeWarning: invalid value encountered" flooding logs — how to scope np.seterr without global side effects
A numerical pipeline built on NumPy (assume a recent 1.26/2.x release) emits repeated RuntimeWarning: invalid value encountered in ... messages from a handful of known-benign operations, such as 0/0 ratios in masked aggregations. The goal is to keep genuinely useful alerts for unexpected nan / inf propagation while silencing the expected cases, so real probl