What does the asterisk * in the PyTorch docs mean?

I have been reading the PyTorch documentation and have come across the asterisk being used as a function argument. I know that the asterisk is used in Python to pack/unpack arguments, but I can not find any reference to this case online.

An example of this is the torch.normal function. The documentation gives the following with no explanation of the asterisk:

torch.normal(mean, std, *, generator=None, out=None )

If I am not wrong, the arguments after * are keyword only arguments, introduced in PEP 3102.

1 Like