webbpsf_ext.maths.round_int

webbpsf_ext.maths.round_int(val, half_round='down')[source]

Replacement for round and np.round, which uses ‘bankers rounding’ such that x.5 is rounded to the nearest even number. Instead, we want x.5 to round down. Option to round x.5 up by setting half_round=’up’.