Skip to content

Commit

Permalink
Update docstring of tf.sets.difference to include Raises
Browse files Browse the repository at this point in the history
This fix updated docstring of tf.sets.difference to include
conditions that raises exceptions.

This fix fixes 29897.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
  • Loading branch information
yongtang committed Jun 19, 2019
1 parent d3087d0 commit eb34b00
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tensorflow/python/ops/sets_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ def set_difference(a, b, aminusb=True, validate_indices=True):
A `SparseTensor` whose shape is the same rank as `a` and `b`, and all but
the last dimension the same. Elements along the last dimension contain the
differences.
Raises:
TypeError: If inputs are invalid types, or if `a` and `b` have
different types.
ValueError: If `a` is sparse and `b` is dense.
errors_impl.InvalidArgumentError: If the shapes of `a` and `b` do not
match in any dimension other than the last dimension.
"""
a, b, flipped = _convert_to_tensors_or_sparse_tensors(a, b)
if flipped:
Expand Down

0 comments on commit eb34b00

Please sign in to comment.