What is the meanings of `*` in the method of `add_`?

Hi,
I noticed that in definition of the method of tor add_(other, *, alpha=1) → Tensor, there is a *. What does that mean ?

Hi,

Actually, this is a python convention for forcing to use positional arguments.

Bests

1 Like

Yes, look at the official docs:
https://docs.python.org/3/whatsnew/3.8.html#positional-only-parameters

1 Like