# tf.contrib.framework.assert_scalar_int

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/framework/python/framework/tensor_util.py#L302-L319) |

Assert `tensor` is 0-D, of type [`tf.int32`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf#int32) or [`tf.int64`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf#int64).

    tf.contrib.framework.assert_scalar_int(
        tensor, name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tensor` | `Tensor` to test. |
| `name` | Name of the op and of the new `Tensor` if one is created. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `tensor`, for chaining. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if `tensor` is not 0-D, of integer type. |

<br />