def compare_ndarray_tuple(t1, t2, rtol=None, atol=None):
if t1 is not None and t2 is not None:<EOL><INDENT>if isinstance(t1, tuple):<EOL><INDENT>for s1, s2 in zip(t1, t2):<EOL><INDENT>compare_ndarray_tuple(s1, s2, rtol, atol)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>assert_almost_equal(t1.asnumpy(), t2.asnumpy(), rtol=rtol, atol=atol)<EOL><DEDENT><DEDENT>
Compare ndarray tuple.