Checks the equality of two masked arrays, up to given number odecimals. The equality is checked elementwise.
(x, y, decimal=6, err_msg='', verbose=True)
| 245 | |
| 246 | |
| 247 | def assert_array_approx_equal(x, y, decimal=6, err_msg='', verbose=True): |
| 248 | """ |
| 249 | Checks the equality of two masked arrays, up to given number odecimals. |
| 250 | |
| 251 | The equality is checked elementwise. |
| 252 | |
| 253 | """ |
| 254 | def compare(x, y): |
| 255 | "Returns the result of the loose comparison between x and y)." |
| 256 | return approx(x, y, rtol=10. ** -decimal) |
| 257 | assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose, |
| 258 | header='Arrays are not almost equal') |
| 259 | |
| 260 | |
| 261 | def assert_array_almost_equal(x, y, decimal=6, err_msg='', verbose=True): |
nothing calls this directly
no test coverage detected
searching dependent graphs…