diff options
Diffstat (limited to 'tensorflow/python/ops/array_ops.py')
-rw-r--r-- | tensorflow/python/ops/array_ops.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/python/ops/array_ops.py b/tensorflow/python/ops/array_ops.py index b4e1b9d781..ec7c14f7d8 100644 --- a/tensorflow/python/ops/array_ops.py +++ b/tensorflow/python/ops/array_ops.py @@ -1316,6 +1316,18 @@ def unique(x, out_idx=dtypes.int32, name=None): unique.__doc__ = gen_array_ops.unique.__doc__ +@tf_export("unique_with_counts") +def unique_with_counts(x, out_idx=dtypes.int32, name=None): + # TODO(yongtang): switch to v2 once API deprecation + # period (3 weeks) pass. + # TODO(yongtang): The documentation should also + # be updated when switch to v2. + return gen_array_ops.unique_with_counts(x, out_idx, name) + + +unique_with_counts.__doc__ = gen_array_ops.unique_with_counts.__doc__ + + @tf_export("split") def split(value, num_or_size_splits, axis=0, num=None, name="split"): """Splits a tensor into sub tensors. |