class_docstr: Test cases for binary operators.
docstr: Test cases for remainder operators.
docstr_tok: ["Test","cases","for","remainder","operators","."]
code: def _testRemainder(self, dtype):
      """Test cases for remainder operators."""
      self._testBinary(
          gen_math_ops.floor_mod,
          np.array([3, 3, -1, -8], dtype=dtype),
          np.array([2, -2, 7, -4], dtype=dtype),
          expected=np.array([1, -1, 6, 0], dtype=dtype),
      )
      self._testBinary(
          gen_math_ops.truncate_mod,
          np.array([3, 3, -1, -8], dtype=dtype),
          np.array([2, -2, 7, -4], dtype=dtype),
          expected=np.array([1, 1, -1, 0], dtype=dtype),
      )
      if dtype in self.signed_int_types:
          # Overflow cases.
          int_min = np.iinfo(dtype).min
          int_max = np.iinfo(dtype).max
          self._testBinary(
              gen_math_ops.floor_mod,
              np.array([int_min, -1, 1, int_max], dtype=dtype).reshape(
                  [1, 4]
              ),
              np.array([int_min, -1, 1, int_max], dtype=dtype).reshape(
                  [4, 1]
              ),
              expected=np.array(
                  [
                      [0, -1, -1 * int_max, -1],
                      [0, 0, 0, 0],
                      [0, 0, 0, 0],
                      [int_max - 1, int_max - 1, 1, 0],
                  ],
                  dtype=dtype,
              ),
          )
          self._testBinary(
              gen_math_ops.truncate_mod,
              np.array([int_min, -1, 1, int_max], dtype=dtype).reshape(
                  [1, 4]
              ),
              np.array([int_min, -1, 1, int_max], dtype=dtype).reshape(
                  [4, 1]
              ),
              expected=np.array(
                  [
                      [0, -1, 1, int_max],
                      [0, 0, 0, 0],
                      [0, 0, 0, 0],
                      [-1, -1, 1, 0],
                  ],
                  dtype=dtype,
              ),
          )
  
imports: import itertools
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import bitwise_ops
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import gen_math_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
  from tensorflow.python.platform import test
label_desc: Use image node_id 16 for calling the BinaryOpsTest obj's underlying member method code with example usage: obj._testRemainder(dtype) without return types