diff --git a/tensorcircuit/gates.py b/tensorcircuit/gates.py index c0fda8ae..73c68757 100644 --- a/tensorcircuit/gates.py +++ b/tensorcircuit/gates.py @@ -229,10 +229,9 @@ def num_to_tensor(*num: Union[float, Tensor], dtype: Optional[str] = None) -> An :type num: Union[float, Tensor] :param dtype: dtype of the output Tensors :type dtype: str, optional - :return: List of Tensors - :rtype: List[Tensor] + :return: List of Tensors or a single Tensor + :rtype: Union[List[Tensor], Tensor] """ - # TODO(@YHPeter): fix __doc__ for same function with different names l = [] if dtype is None: diff --git a/tensorcircuit/utils.py b/tensorcircuit/utils.py index ab72b3c4..c3fe774a 100644 --- a/tensorcircuit/utils.py +++ b/tensorcircuit/utils.py @@ -53,8 +53,8 @@ def return_partial( :param f: The function to be applied this method :type f: Callable[..., Any] - :param return_partial: The ith parts of original output along the first axis (axis=0 or dim=0) - :type return_partial: Union[int, Sequence[int]] + :param return_argnums: The ith parts of original output along the first axis (axis=0 or dim=0) + :type return_argnums: Union[int, Sequence[int]] :return: The modified callable function :rtype: Callable[..., Any] """