class_docstr: Test getting and setting global print options.
class_docstr_tok: ["Test","getting","and","setting","global","print","options","."]
code: def test_bad_args(self):
      assert_raises(
          ValueError, np.set_printoptions, threshold=float("nan")
      )
      assert_raises(TypeError, np.set_printoptions, threshold="1")
      assert_raises(TypeError, np.set_printoptions, threshold=b"1")
  
      assert_raises(TypeError, np.set_printoptions, precision="1")
      assert_raises(TypeError, np.set_printoptions, precision=1.5)
  
imports: import sys
  import gc
  from hypothesis import given
  from hypothesis.extra import numpy
  import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_raises, assert_warns, HAS_REFCOUNT, assert_raises_regex
  from numpy.core.arrayprint import _typelessdata
  import textwrap
label_desc: Use image node_id 22 for calling the TestPrintOptions obj's underlying member method code with example usage: obj.test_bad_args() without return types