Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docstring of tf.sets.difference to include Raises #29938

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions tensorflow/python/ops/sets_impl.py
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