<p dir="auto">It would be great if you could add <code class="notranslate">torch.pi</code>, which should return the constant 3.14159(etc).</p>
<p dir="auto">Torch is highly desirable as a significantly faster alternative to numpy, implementing most of its functions. But it's missing a very basic thing, which is an easily accessible <code class="notranslate">pi</code> constant. It would be great and convenient if this simple thing were added.</p>
<p dir="auto">As for implementation, literally linking to math.pi would be fine.</p>
<p dir="auto">Currently, the only way to access <code class="notranslate">pi</code> would be to import it from another library like math/numpy, or to do <code class="notranslate">torch.asin(torch.tensor(1.))</code>.</p>
<p dir="auto">See title. I think this could be useful if you don't want to google it every time.</p>