Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PyTorch torch.arcsin function

PyTorch torch.arcsin function


PyTorch torch reference manual PyTorch torch reference manual

torch.arcsin is a function in PyTorch used to compute the element-wise arcsine, the same as torch.asin in functionality.

Function definition

torch.arcsin(input, out=None)


Usage examples

Example

import

torch

Creating tensors

x

=

torch.

tensor

(

[

1.0

,

0.5

,

0.0

,

0.5

,

1.0

]

)

Compute the arcsine

result

=

torch.

arcsin

(

x

)

print

(

result

)

The output is:

tensor([-1.5708, -0.5236,  0.0000,  0.5236,  1.5708])


PyTorch torch reference manual PyTorch torch reference manual