docstr: Tests 1-d batch.
docstr_tok: ["Tests","1-d","batch","."]
code: def test_1d_batch_1d(self, use_analytic_pricing, error_tol):
      """Tests 1-d batch."""
      dtype = tf.float64
  
      price = tff.models.hull_white.swaption_price(
          expiries=self.expiries_1d,
          floating_leg_start_times=self.float_leg_start_times_1d,
          floating_leg_end_times=self.float_leg_end_times_1d,
          fixed_leg_payment_times=self.fixed_leg_payment_times_1d,
          floating_leg_daycount_fractions=self.float_leg_daycount_fractions_1d,
          fixed_leg_daycount_fractions=self.fixed_leg_daycount_fractions_1d,
          fixed_leg_coupon=self.fixed_leg_coupon_1d,
          reference_rate_fn=self.zero_rate_fn,
          notional=100.0,
          mean_reversion=self.mean_reversion_1d,
          volatility=self.volatility_1d,
          use_analytic_pricing=use_analytic_pricing,
          num_samples=500_000,
          time_step=0.1,
          random_type=tff.math.random.RandomType.STATELESS_ANTITHETIC,
          seed=[4, 2],
          dtype=dtype,
      )
      self.assertEqual(price.dtype, dtype)
      self.assertAllEqual(price.shape, [2])
      price = self.evaluate(price)
      self.assertAllClose(
          price,
          [0.7163243383624043, 0.7163243383624043],
          rtol=error_tol,
          atol=error_tol,
      )
  
file_path: tf-quant-finance/tf_quant_finance/models/hull_white/swaption_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 5 for calling the HullWhiteSwaptionTest obj's underlying member method code with example usage: obj.test_1d_batch_1d(use_analytic_pricing, error_tol) without return types