code: def test_scramble_generating_matrices_with_minimum_scrambling_matrices(
      self,
  ):
      dim = 6
      num_results = 8
      num_digits = 3  # ceil(log2(num_results))
  
      for dtype in [tf.int32, tf.int64]:
          generating_matrices = qmc.sobol_generating_matrices(
              dim, num_results, num_digits, dtype=dtype
          )
  
          # All scrambling matrices values are between 2^{num_digits - 1} (incl.)
          # and 2^{num_digits} (excl.). Scrambling using matrices for which all
          # values are set to 2^{num_digits - 1} should be a no-op.
          min_scrambling_matrices = tf.broadcast_to(
              qmc.utils.exp2(tf.cast(num_digits, dtype) - 1),
              shape=generating_matrices.shape,
          )
  
          actual = qmc.scramble_generating_matrices(
              generating_matrices,
              min_scrambling_matrices,
              num_digits,
              dtype=dtype,
              validate_args=True,
          )
  
          with self.subTest("Shape"):
              self.assertEqual(actual.shape, generating_matrices.shape)
          with self.subTest("DType"):
              self.assertEqual(actual.dtype, generating_matrices.dtype)
          with self.subTest("Values"):
              self.assertAllEqual(
                  self.evaluate(actual),
                  self.evaluate(generating_matrices),
              )
  
file_path: tf-quant-finance/tf_quant_finance/math/qmc/digital_net_test.py
imports: import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 10 for calling the DigitalNetTest obj's underlying member method code with example usage: obj.test_scramble_generating_matrices_with_minimum_scrambling_matrices() without return types