tf.math.is_non_decreasing should throw an exception when argument x isn't numeric
Same issue can be found in `tf.math.is_strictly_increasing`. Hi @cheyennee ,

Thanks for reporting. The behaviour seems coming from `tf.reshape` which is being used internally by the API `tf.math.is_non_decreasing`.I have attached the [gist](https://colab.research.google.com/gist/SuryanarayanaY/35fa14f9b0cb644dd920146eac5971dc/60513.ipynb) for analysis of same and for reference.

For example:
Code1:
```
x=[-1,1,True]
x=tf.reshape(x,[-1])
print('after reshaping: ',x)
if not is_numeric_tensor(x):
    raise TypeError('Expected x to be numeric, instead found: %s' % x)

#Output: after reshaping:  tf.Tensor([-1  1  1], shape=(3,), dtype=int32)
```
Code2: 

```
x=[True,False,True]
x= tf.reshape(x,[-1])
print('after reshaping: ',x)
if not is_numeric_tensor(x):
    raise TypeError('Expected x to be numeric, instead found: %s' % x)

#output:after reshaping:  tf.Tensor([ True False  True], shape=(3,), dtype=bool)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-23-1e79c028007d>](https://localhost:8080/#) in <cell line: 4>()
      3 print('after reshaping: ',x)
      4 if not is_numeric_tensor(x):
----> 5     raise TypeError('Expected x to be numeric, instead found: %s' % x)

TypeError: Expected x to be numeric, instead found: tf.Tensor([ True False  True], shape=(3,), dtype=bool)
```

Need to check reasons for this behaviour. Thanks!

 Hi @cheyennee ,

Apologies for the late response. I have gone through the issue and identified the reason for this behaviour.

The API `tf.math.is_non_decreasing `expects the input to be an numeric Tensor. If we pass python bool it will be converted to 0 or 1 . This is the expected behaviour with python bool data types. If we pass bool tensor then it is raising the intended error. Please refer to attached [gist](https://colab.research.google.com/gist/SuryanarayanaY/dfb67fb0c5534c499222c6853f8f602f/60513_r1.ipynb) for the tests done.  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/60513">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/60513">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

tf 2.12.0

### Custom Code

Yes

### OS Platform and Distribution

win11

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

According to [doc](https://tensorflow.google.cn/api_docs/python/tf/math/is_non_decreasing), the argument `x` should be numeric tensor. When the values of the argument `x` only contain bool, it throws an exception as following snippet code 1 shows. However, when the values of the argument `x` are contained with int and bool value, it wont throw an exception as snippet code 2 shows. I suppose that it may cast bool type to int type when there're both int and bool value in argument `x`, but I think this conversion is unexpected.

### Standalone code to reproduce the issue

```shell
snippet code 1:

import tensorflow as tf
results={}
try:
  x_0 = True
  x_1 = True
  x_2 = False
  x = (x_0,x_1,x_2,)
  results["res"] = tf.math.is_non_decreasing(x=x,)
except Exception as e:
  results["err"] = "Error:"+str(e)
print(results)
# results={'err': 'Error:Expected x to be numeric, instead found: tf.Tensor([ True  True False], shape=(3,), dtype=bool)'}
```

snippet code 2:
```
import tensorflow as tf
results={}
try:
  x_0 = -16
  x_1 = 16
  x_2 = False
  x = (x_0,x_1,x_2,)
  results["res"] = tf.math.is_non_decreasing(x=x,)
except Exception as e:
  results["err"] = "Error:"+str(e)
print(results)
# results={'res': <tf.Tensor: shape=(), dtype=bool, numpy=False>}
```
```


### Relevant log output

_No response_</details>