Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit f669725

Browse files
committed
formatting
1 parent 02c9ad5 commit f669725

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tensornetwork/backends/abstract_backend.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -964,47 +964,47 @@ def pivot(self, tensor: Tensor, pivot_axis: int = -1) -> Tensor:
964964
def serialize_tensor(self, tensor: Tensor) -> str:
965965
"""
966966
Return a string that serializes the given tensor.
967-
967+
968968
Args:
969969
tensor: The input tensor.
970-
970+
971971
Returns:
972-
A string representing the serialized tensor.
972+
A string representing the serialized tensor.
973973
"""
974974
raise NotImplementedError(
975975
"Backend '{}' has not implemented serialize_tensor.".format(self.name))
976976

977977
def deserialize_tensor(self, s: str) -> Tensor:
978978
"""
979-
Return a tensor given a serialized tensor string.
980-
979+
Return a tensor given a serialized tensor string.
980+
981981
Args:
982982
s: The input string representing a serialized tensor.
983-
983+
984984
Returns:
985985
The tensor object represented by the string.
986-
986+
987987
"""
988988
raise NotImplementedError(
989989
"Backend '{}' has not implemented deserialize_tensor.".format(
990990
self.name))
991991

992992
def power(self, a: Tensor, b: Union[Tensor, float]) -> Tensor:
993993
"""
994-
Returns the exponentiation of tensor a raised to b.
995-
If b is a tensor, then the exponentiation is element-wise
994+
Returns the exponentiation of tensor a raised to b.
995+
If b is a tensor, then the exponentiation is element-wise
996996
between the two tensors, with a as the base and b as the power.
997-
Note that a and b must be broadcastable to the same shape if
997+
Note that a and b must be broadcastable to the same shape if
998998
b is a tensor.
999999
If b is a scalar, then the exponentiation is each value in a
10001000
raised to the power of b.
1001-
1001+
10021002
Args:
10031003
a: The tensor containing the bases.
10041004
b: The tensor containing the powers; or a single scalar as the power.
10051005
10061006
Returns:
1007-
The tensor that is each element of a raised to the
1007+
The tensor that is each element of a raised to the
10081008
power of b. Note that the shape of the returned tensor
10091009
is that produced by the broadcast of a and b.
10101010
"""

0 commit comments

Comments
 (0)