MCPcopy Index your code
hub / github.com/pytorch/tutorials / numpy_sin

Function numpy_sin

advanced_source/python_custom_ops_registrations.py:45–48  ·  view source on GitHub ↗
(x: Tensor)

Source from the content-addressed store, hash-verified

43 device_types="cpu",
44)
45def numpy_sin(x: Tensor) -> Tensor:
46 result = torch.empty_like(x)
47 np.sin(x.detach().numpy(), out=result.numpy())
48 return result
49
50
51@numpy_sin.register_fake

Calls

no outgoing calls

Tested by

no test coverage detected