class_docstr: Test cases for unary operators.
class_docstr_tok: ["Test","cases","for","unary","operators","."]
code: def testIsInfAndIsNan(self):
      for dtype in self.float_types:
          self._assertOpOutputMatchesExpected(
              math_ops.is_inf,
              np.array(
                  [[np.NINF, -2, -1, 0, 0.5, 1, 2, np.inf, np.nan]],
                  dtype=dtype,
              ),
              expected=np.array(
                  [[1, 0, 0, 0, 0, 0, 0, 1, 0]], dtype=np.bool_
              ),
          )
          self._assertOpOutputMatchesExpected(
              math_ops.is_nan,
              np.array(
                  [[np.NINF, -2, -1, 0, 0.5, 1, 2, np.inf, np.nan]],
                  dtype=dtype,
              ),
              expected=np.array(
                  [[0, 0, 0, 0, 0, 0, 0, 0, 1]], dtype=np.bool_
              ),
          )
          self._assertOpOutputMatchesExpected(
              math_ops.sign,
              np.array([[np.nan]], dtype=dtype),
              expected=np.array([[0.0]], dtype=dtype),
          )
  
imports: import platform
  import unittest
  import numpy
  import six
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import bitwise_ops
  from tensorflow.python.ops import gen_functional_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 15 for calling the UnaryOpsTest obj's underlying member method code with example usage: obj.testIsInfAndIsNan() without return types