docstr: Tests the _arrays_all_close() helper function.
docstr_tok: ["Tests","the","_arrays_all_close","(",")","helper","function","."]
code: def test_arrays_all_close(self, dtype):
      """Tests the _arrays_all_close() helper function."""
      with self.subTest("Expected pass"):
          a = tf.ones([4, 2, 3], dtype)
          b = a * 0.99
          atol = a * 0.02
          gmb_utils.arrays_all_close(self, a, b, atol)
  
      with self.subTest("Shape mismatch"):
          a = tf.ones([4, 2, 3], dtype)
          b = tf.ones([4, 1, 3], dtype) * 0.99
          atol = a * 0.02
          with self.assertRaises(ValueError):
              gmb_utils.arrays_all_close(self, a, b, atol)
  
      with self.subTest("Values not close"):
          a = tf.ones([4, 2, 3], dtype)
          b = tf.ones([4, 2, 3], dtype) * 0.99
          c = tf.tensor_scatter_nd_update(b, [(1, 1, 1)], [0.95])
          atol = a * 0.02
          with self.assertRaises(ValueError):
              gmb_utils.arrays_all_close(self, a, c, atol)
  
file_path: tf-quant-finance/tf_quant_finance/models/geometric_brownian_motion/geometric_brownian_motion_test_utils_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import test_util
  from tf_quant_finance.models.geometric_brownian_motion import geometric_brownian_motion_test_utils
label_desc: Use image node_id 1 for calling the GeometricBrownianMotionTestUtilsTest obj's underlying member method code with example usage: obj.test_arrays_all_close(dtype) without return types