docstr: Tests model with constant parameters in 1 dimension.
docstr_tok: ["Tests","model","with","constant","parameters","in","1","dimension","."]
code: def test_receiver_1d(self, use_analytic_pricing, error_tol):
      """Tests model with constant parameters in 1 dimension."""
      # 1y x 1y receiver swaption with quarterly payments.
      dtype = tf.float64
      price = tff.models.hull_white.swaption_price(
          expiries=self.expiries,
          floating_leg_start_times=self.float_leg_start_times,
          floating_leg_end_times=self.float_leg_end_times,
          fixed_leg_payment_times=self.fixed_leg_payment_times,
          floating_leg_daycount_fractions=self.float_leg_daycount_fractions,
          fixed_leg_daycount_fractions=self.fixed_leg_daycount_fractions,
          fixed_leg_coupon=self.fixed_leg_coupon,
          reference_rate_fn=self.zero_rate_fn,
          notional=100.0,
          mean_reversion=self.mean_reversion_1d,
          volatility=self.volatility_1d,
          is_payer_swaption=False,
          use_analytic_pricing=use_analytic_pricing,
          num_samples=500000,
          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, [])
      price = self.evaluate(price)
      self.assertAllClose(
          price, 0.813482544626056, 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 3 for calling the HullWhiteSwaptionTest obj's underlying member method code with example usage: obj.test_receiver_1d(use_analytic_pricing, error_tol) without return types