# tf.compat.v2.debugging.assert_integer

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/check_ops.py#L1418-L1435) |

Assert that `x` is of integer dtype.

    tf.compat.v2.debugging.assert_integer(
        x, message=None, name=None
    )

If `x` has a non-integer type, `message`, as well as the dtype of `x` are
printed, and `InvalidArgumentError` is raised.

This can always be checked statically, so this method returns nothing.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A `Tensor`. |
| `message` | A string to prefix to the default message. |
| `name` | A name for this operation (optional). Defaults to "assert_integer". |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If `x.dtype` is not a non-quantized integer type. |

<br />