class_docstr: Test cases for unary operators.
class_docstr_tok: ["Test","cases","for","unary","operators","."]
code: def testBitcast(self):
      self._assertOpOutputMatchesExpected(
          lambda x: array_ops.bitcast(x, dtypes.int32),
          np.array([1, 0x3F800000], np.int32),
          expected=np.array([1, 0x3F800000], np.int32),
      )
      self._assertOpOutputMatchesExpected(
          lambda x: array_ops.bitcast(x, dtypes.float32),
          np.array([1, 0x3F800000], np.int32),
          expected=np.array([1e-45, 1.0], np.float32),
      )
      self._assertOpOutputMatchesExpected(
          lambda x: array_ops.bitcast(x, dtypes.int32),
          np.array([1e-45, 1.0], np.float32),
          expected=np.array([1, 0x3F800000], np.int32),
      )
      if np.int64 in self.numeric_types:
          self._assertOpOutputMatchesExpected(
              lambda x: array_ops.bitcast(x, dtypes.int64),
              np.array([1, 0x100000003F800000], np.uint64),
              expected=np.array([1, 0x100000003F800000], np.int64),
          )
          self._assertOpOutputMatchesExpected(
              lambda x: array_ops.bitcast(x, dtypes.uint64),
              np.array([1, 0x100000003F800000], np.int64),
              expected=np.array([1, 0x100000003F800000], np.uint64),
          )
          self._assertOpOutputMatchesExpected(
              lambda x: array_ops.bitcast(x, dtypes.float64),
              np.array(
                  [
                      0,
                      0x3FF0000000000000,
                      0xC3AF161421C8E000,
                      0x4032000000000007,
                  ],
                  np.uint64,
              ),
              expected=np.array(
                  [0, 1.0, -1.12e18, 18.000000000000024869], np.float64
              ),
              atol=0,
          )
  
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 21 for calling the UnaryOpsTest obj's underlying member method code with example usage: obj.testBitcast() without return types