<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":kmath-tensors:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword">abstract </span><spanclass="token keyword"></span><spanclass="token keyword">fun </span><ahref="../index.html#-1680022905%2FClasslikes%2F-1345790395">Tensor</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span><spanclass="token punctuation">.</span><ahref="view-as.html"><spanclass="token function">viewAs</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">other<spanclass="token operator">: </span><ahref="../../../kmath-core/space.kscience.kmath.nd/-structure-n-d/index.html">StructureND</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../index.html#-1680022905%2FClasslikes%2F-1345790395">Tensor</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/SciProgCentre/kmath/tree/master/kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/api/TensorAlgebra.kt#L206">source</a>)</span></span></div><pclass="paragraph">View this tensor as the same size as <ahref="view-as.html">other</a>. <codeclass="lang-kotlin">this.viewAs(other)</code> is equivalent to <codeclass="lang-kotlin">this.view(other.shape)</code>. For more information: https://pytorch.org/cppdocs/notes/tensor_indexing.html</p><spanclass="kdoc-tag"><h4class="">Return</h4><pclass="paragraph">the result tensor with the same size as other.</p></span><h4class="">Parameters</h4><divclass="table"><divclass="table-row"data-filterable-current=":kmath-tensors:dokkaHtmlPartial/commonMain"data-filterable-set=":kmath-tensors:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>other</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">the result tensor has the same size as other.</p></div></div></div></div></div></div></div>