`Check failed` and other errors in `tf.unstack` when dtype of `axis` is `uint64`.
@xl1043237213,
The args axis for the API **tf.unstack** should work with int as mentioned with the document. Here you are trying with the **uint64** which is not supported. I tried with the **int** and it was executed as expected. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/f3e31d29b12d9c5889b7cc62228fb752/untitled1850.ipynb).

https://www.tensorflow.org/api_docs/python/tf/unstack#args

Thank you! > ### Issue type
> Bug
> 
> ### Have you reproduced the bug with TensorFlow Nightly?
> Yes
> 
> ### Source
> binary
> 
> ### TensorFlow version
> tf 2.15
> 
> ### Custom code
> No
> 
> ### OS platform and distribution
> Linux Ubuntu 20.04
> 
> ### Mobile device
> _No response_
> 
> ### Python version
> _No response_
> 
> ### Bazel version
> _No response_
> 
> ### GCC/compiler version
> _No response_
> 
> ### CUDA/cuDNN version
> _No response_
> 
> ### GPU model and memory
> _No response_
> 
> ### Current behavior?
> `axis` of `tf.unstack` does support inputs with dtype `uint64`, which produces odd error messages such as "ValueError: Argument `axis` = 1 not in range [-2, 2)". Meanwhile, rather oddly, the `axis = tf.constant(1, dtype=tf.uint64)` triggers `OverflowError`, and and repeating this error triggers `Check failed`. See the colab link below for details.
> 
> ### Standalone code to reproduce the issue
> ```shell
> https://colab.research.google.com/drive/10Eruvnb1cArC2SBz010lDNIKVd9VRd3i#scrollTo=ZOa0hboFxZ8B
> ```
> 
> ### Relevant log output
> ```shell
> Check failed: !PyErr_Occurred()
> Aborted (core dumped)
> ```

Users expect it to raise some exception incase of invalid input and not definitely the crash.
### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

binary

### TensorFlow version

tf 2.15

### Custom code

No

### OS platform and distribution

Linux Ubuntu 20.04

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

`axis` of `tf.unstack` does support inputs with dtype `uint64`, which produces odd error messages such as "ValueError: Argument `axis` = 1 not in range [-2, 2)". Meanwhile, rather oddly, the `axis = tf.constant(1, dtype=tf.uint64)` triggers `OverflowError`, and and repeating this error triggers `Check failed`. See the colab link below for details.

### Standalone code to reproduce the issue

```shell
https://colab.research.google.com/drive/10Eruvnb1cArC2SBz010lDNIKVd9VRd3i#scrollTo=ZOa0hboFxZ8B
```


### Relevant log output

```shell
Check failed: !PyErr_Occurred()
Aborted (core dumped)
```
