Confusing result of tf.argsort/argmax/argmin/ given a boolean axis
Hi @drewshark ,

The mentioned APIs also works for `bool` data types for `axis` argument even though it's not explicitly mentioned in the documentation.This may be true for some of other APIs also.May be we can add a note in the documentation regarding bool as accepted datatype.Attached below is the line of code where `argmax_op` is registered for bool data type.

https://github.com/tensorflow/tensorflow/blob/216a1a0d4633a068fa671252541305438b353954/tensorflow/core/kernels/argmax_op.cc#L173

When it comes to string ,the API tf.argsort will try to convert this into a numeric in the line of code. This may be due to the reason that mentioned in the comment in the same line.If the string contains chars other than numbers then it will raise intended error.Only numerics in the form of strings are accepted here and these values also validated after conversion into integers.Attached [gist](https://colab.research.google.com/gist/SuryanarayanaY/1390af7af4ac75698a542269d84c0d77/63031.ipynb) for reference.

`
axis_static = int(axis_static)  # Avoids NumPy casting error
 ` @drewshark, Please note that the API tf.argmin accepts axis as Tensor unlike argmax which accepts integer. If you pass a boolean Tensor for `tf.argmin` then it will raise error below.
`InvalidArgumentError: Value for attr 'Tidx' of bool is not in the list of allowed values: int32, int64`

 However if we pass python boolean then its accepting same.This behaviour also different and needs a fix IMO. The documentation of tf.argsort not mentioning any dtype of the argument axis explicitly.IMO, we can leave this as it is.


axis | The axis along which to sort. The default is -1, which sorts the last axis. 
-- | --


 There is no legitimate use-case for passing in a bool.  As with numpy, bools are a form of integer type, so it is being interpreted as such.  There shouldn't be any confusion for legitimate use-cases. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/63031">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/63031">No</a>

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

2.15.0

### Custom code

Yes

### OS platform and distribution

_No response_

### 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?

These three APIs tf.argsort/argmax/argmin will accept boolean axis such as True and False, which confuses me. Indeed, the documentation claims that the type of axis for tf.argmax and tf.argmin should be integer (https://www.tensorflow.org/api_docs/python/tf/math/argmax, https://www.tensorflow.org/api_docs/python/tf/math/argmin).

Moreover, tf.argsort can also accept string variable.

Taking a closer look, I find this code: https://github.com/tensorflow/tensorflow/blob/74cafb3ee7ce22dc2593127a2a6d8e78425e2640/tensorflow/python/ops/sort_ops.py#L179

It seems that argsort will convert any value of axis to integer using the `int()` call. 
However, such silent handling might make user confuse because the actual behavior deviates from the documentation.


### Standalone code to reproduce the issue

```shell
import tensorflow as tf
values = tf.constant([[3,1,4,1,5,9,2,6], [3,4,5,1,2,3,4,0]])
axis = True
print(tf.argsort(values,axis))  # tf.Tensor([[1 3 0 2] [3 0 1 2]], shape=(2, 4), dtype=int32)
print(tf.argmax(values,axis))  # tf.Tensor([2 2], shape=(2,), dtype=int64)
print(tf.argmin(values,axis))  # tf.Tensor([1 3], shape=(2,), dtype=int64)
axis = '-1'
print(tf.argsort(values, axis))  # tf.Tensor([[1 3 0 2] [3 0 1 2]], shape=(2, 4),dtype=int32)
```


### Relevant log output

_No response_