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

fix cast_precision breaking docstring #1437

Merged
merged 1 commit into from
Jan 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions deepmd/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,6 @@ def cast_precision(func: Callable) -> Callable:
If it does not match (e.g. it is an integer), the decorator
will do nothing on it.

Parameters
----------
precision : tf.DType
Tensor data type that casts to

Returns
-------
Callable
Expand All @@ -560,6 +555,7 @@ def cast_precision(func: Callable) -> Callable:
... def f(x: tf.Tensor, y: tf.Tensor) -> tf.Tensor:
... return x ** 2 + y
"""
@wraps(func)
def wrapper(self, *args, **kwargs):
# only convert tensors
returned_tensor = func(
Expand Down