mxnet.test_utils.almost_equal_ignore_nan¶

mxnet.test_utils.almost_equal_ignore_nan(a, b, rtol=None, atol=None)[source]

Test that two NumPy arrays are almost equal (ignoring NaN in either array). Combines a relative and absolute measure of approximate eqality. If either the relative or absolute check passes, the arrays are considered equal. Including an absolute check resolves issues with the relative check where all array values are close to zero.

Parameters
• a (np.ndarray) –

• b (np.ndarray) –

• rtol (None or float) – The relative threshold. Default threshold will be used if set to None.

• atol (None or float) – The absolute threshold. Default threshold will be used if set to None.