Make NumPy Array Arithmetic Overflow- and Promotion-Safe
A practical pattern for making NumPy array arithmetic reproducible: pin input dtypes, predict result types with np.result_type, force reduction dtypes, and turn floating-point warnings into exceptions in critical sections.