Returns `True` if `x` is strictly increasing. Elements of `x` are compared in row-major order. The tensor `[x[0],...]` is strictly increasing if for every adjacent pair we have `x[i] < x[i+1]`. If `x` has less than two elements, it is trivially strictly increasing. See also: `is_non_decr
(x, name=None)
| 1939 | @deprecation.deprecated_endpoints('debugging.is_strictly_increasing', |
| 1940 | 'is_strictly_increasing') |
| 1941 | def is_strictly_increasing(x, name=None): |
| 1942 | """Returns `True` if `x` is strictly increasing. |
| 1943 | |
| 1944 | Elements of `x` are compared in row-major order. The tensor `[x[0],...]` |
| 1945 | is strictly increasing if for every adjacent pair we have `x[i] < x[i+1]`. |
| 1946 | If `x` has less than two elements, it is trivially strictly increasing. |
| 1947 | |
| 1948 | See also: `is_non_decreasing` |
| 1949 | |
| 1950 | Args: |
| 1951 | x: Numeric `Tensor`. |
| 1952 | name: A name for this operation (optional). |
| 1953 | Defaults to "is_strictly_increasing" |
| 1954 | |
| 1955 | Returns: |
| 1956 | Boolean `Tensor`, equal to `True` iff `x` is strictly increasing. |
| 1957 | |
| 1958 | Raises: |
| 1959 | TypeError: if `x` is not a numeric tensor. |
| 1960 | """ |
| 1961 | with ops.name_scope(name, 'is_strictly_increasing', [x]): |
| 1962 | diff = _get_diff_for_monotonic_comparison(x) |
| 1963 | # When len(x) = 1, diff = [], less = [], and reduce_all([]) = True. |
| 1964 | zero = ops.convert_to_tensor(0, dtype=diff.dtype) |
| 1965 | return math_ops.reduce_all(math_ops.less(zero, diff)) |
| 1966 | |
| 1967 | |
| 1968 | def _assert_same_base_type(items, expected_type=None): |
nothing calls this directly
no test coverage detected