class_docstr: Tests for methods in newton_vol module.
class_docstr_tok: ["Tests","for","methods","in","newton_vol","module","."]
docstr: Tests validation errors raised where BS model assumptions violated.
docstr_tok: ["Tests","validation","errors","raised","where","BS","model","assumptions","violated","."]
code: def test_implied_vol_validate_raises(
      self, price, forward, strike, expiry, option_sign
  ):
      """Tests validation errors raised where BS model assumptions violated."""
      prices = np.array([price])
      forwards = np.array([forward])
      strikes = np.array([strike])
      expiries = np.array([expiry])
      is_call_options = np.array([option_sign > 0])
      discounts = np.array([1.0])
      with self.assertRaises(tf.errors.InvalidArgumentError):
          self.evaluate(
              tff.black_scholes.implied_vol_newton(
                  prices=prices,
                  strikes=strikes,
                  expiries=expiries,
                  forwards=forwards,
                  discount_factors=discounts,
                  validate_args=True,
                  is_call_options=is_call_options,
              )
          )
  
file_path: tf-quant-finance/tf_quant_finance/black_scholes/implied_vol_newton_root_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 6 for calling the ImpliedVolNewtonTest obj's underlying member method code with example usage: obj.test_implied_vol_validate_raises(price, forward, strike, expiry, option_sign) without return types