PageRenderTime 61ms CodeModel.GetById 33ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/1.0/generated/cf.Data.transpose.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 197 lines | 173 code | 24 blank | 0 comment | 0 complexity | b74e7ff37a88eb6e8142948f799f3763 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>cf.Data.transpose &mdash; Documentation</title>
  7. <link rel="stylesheet" href="../_static/default.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '1.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../_static/jquery.js"></script>
  19. <script type="text/javascript" src="../_static/underscore.js"></script>
  20. <script type="text/javascript" src="../_static/doctools.js"></script>
  21. <script type="text/javascript" src="../_static/copybutton.js"></script>
  22. <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  23. <link rel="top" title="Documentation" href="../index.html" />
  24. <link rel="up" title="cf.Data" href="../classes/cf.Data.html" />
  25. <link rel="next" title="cf.Data.trunc" href="cf.Data.trunc.html" />
  26. <link rel="prev" title="cf.Data.to_memory" href="cf.Data.to_memory.html" />
  27. </head>
  28. <body>
  29. <div class="related">
  30. <h3>Navigation</h3>
  31. <ul>
  32. <li class="right" style="margin-right: 10px">
  33. <a href="../genindex.html" title="General Index"
  34. accesskey="I">index</a></li>
  35. <li class="right" >
  36. <a href="cf.Data.trunc.html" title="cf.Data.trunc"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="cf.Data.to_memory.html" title="cf.Data.to_memory"
  40. accesskey="P">previous</a> |</li>
  41. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  42. <li><select onchange="location = this.options[this.selectedIndex].value;">
  43. <option value="../../1.0/index.html"selected>1.0
  44. <option value="../../0.9.9/index.html">0.9.9
  45. <option value="../../0.9.8.3/index.html">0.9.8.3
  46. <option value="../../archive.html">Archive
  47. </select>
  48. </li>
  49. <li><a href="../index.html">Documentation</a> &raquo;</li>
  50. <li><a href="../reference.html" >Reference manual</a> &raquo;</li>
  51. <li><a href="../class.html" >Classes of the <tt class="docutils literal"><span class="pre">cf</span></tt> module</a> &raquo;</li>
  52. <li><a href="../classes/cf.Data.html" accesskey="U">cf.Data</a> &raquo;</li>
  53. </ul>
  54. </div>
  55. <div class="document">
  56. <div class="documentwrapper">
  57. <div class="bodywrapper">
  58. <div class="body">
  59. <div class="section" id="cf-data-transpose">
  60. <h1>cf.Data.transpose<a class="headerlink" href="#cf-data-transpose" title="Permalink to this headline">Âś</a></h1>
  61. <dl class="method">
  62. <dt id="cf.Data.transpose">
  63. <tt class="descclassname">Data.</tt><tt class="descname">transpose</tt><big>(</big><em>axes=None</em>, <em>i=False</em><big>)</big><a class="reference external" href="https://bitbucket.org/cfpython/cf-python/src/v1.0/cf/data/data.py#cl-8772"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.Data.transpose" title="Permalink to this definition">Âś</a></dt>
  64. <dd><p>Permute the axes of the data array.</p>
  65. <div class="admonition seealso">
  66. <p class="first admonition-title">See also</p>
  67. <p class="last"><a class="reference internal" href="cf.Data.expand_dims.html#cf.Data.expand_dims" title="cf.Data.expand_dims"><tt class="xref py py-obj docutils literal"><span class="pre">expand_dims</span></tt></a>, <a class="reference internal" href="cf.Data.flip.html#cf.Data.flip" title="cf.Data.flip"><tt class="xref py py-obj docutils literal"><span class="pre">flip</span></tt></a>, <a class="reference internal" href="cf.Data.squeeze.html#cf.Data.squeeze" title="cf.Data.squeeze"><tt class="xref py py-obj docutils literal"><span class="pre">squeeze</span></tt></a>, <a class="reference internal" href="cf.Data.swapaxes.html#cf.Data.swapaxes" title="cf.Data.swapaxes"><tt class="xref py py-obj docutils literal"><span class="pre">swapaxes</span></tt></a></p>
  68. </div>
  69. <table class="docutils field-list" frame="void" rules="none">
  70. <col class="field-name" />
  71. <col class="field-body" />
  72. <tbody valign="top">
  73. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
  74. <dt>axes <span class="classifier-delimiter">:</span> <span class="classifier">(sequence of) int</span></dt>
  75. <dd><p class="first last">The new axis order of the data array. By default the order is
  76. reversed. Each axis of the new order is identified by its
  77. original integer position.</p>
  78. </dd>
  79. <dt>i <span class="classifier-delimiter">:</span> <span class="classifier">bool, optional</span></dt>
  80. <dd><p class="first last">If True then update the data array in place. By default a new
  81. data array is created.</p>
  82. </dd>
  83. </dl>
  84. </td>
  85. </tr>
  86. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">out : cf.Data</p>
  87. </td>
  88. </tr>
  89. <tr class="field-odd field"><th class="field-name">Examples:</th><td class="field-body"></td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">shape</span>
  94. <span class="go">(19, 73, 96)</span>
  95. <span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">transpose</span><span class="p">()</span>
  96. <span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">shape</span>
  97. <span class="go">(96, 73, 19)</span>
  98. <span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">transpose</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">])</span>
  99. <span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">shape</span>
  100. <span class="go">(73, 96, 19)</span>
  101. <span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">transpose</span><span class="p">((</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
  102. <span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">shape</span>
  103. <span class="go">(19, 73, 96)</span>
  104. </pre></div>
  105. </div>
  106. </dd></dl>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <div class="sphinxsidebar">
  112. <div class="sphinxsidebarwrapper">
  113. <h4>Previous topic</h4>
  114. <p class="topless"><a href="cf.Data.to_memory.html"
  115. title="previous chapter">cf.Data.to_memory</a></p>
  116. <h4>Next topic</h4>
  117. <p class="topless"><a href="cf.Data.trunc.html"
  118. title="next chapter">cf.Data.trunc</a></p>
  119. <h3>This Page</h3>
  120. <ul class="this-page-menu">
  121. <li><a href="../_sources/generated/cf.Data.transpose.txt"
  122. rel="nofollow">Show Source</a></li>
  123. </ul>
  124. <div id="searchbox" style="display: none">
  125. <h3>Quick search</h3>
  126. <form class="search" action="../search.html" method="get">
  127. <input type="text" name="q" />
  128. <input type="submit" value="Go" />
  129. <input type="hidden" name="check_keywords" value="yes" />
  130. <input type="hidden" name="area" value="default" />
  131. </form>
  132. <p class="searchtip" style="font-size: 90%">
  133. Enter search terms or a module, class or function name.
  134. </p>
  135. </div>
  136. <script type="text/javascript">$('#searchbox').show(0);</script>
  137. </div>
  138. </div>
  139. <div class="clearer"></div>
  140. </div>
  141. <div class="related">
  142. <h3>Navigation</h3>
  143. <ul>
  144. <li class="right" style="margin-right: 10px">
  145. <a href="../genindex.html" title="General Index"
  146. >index</a></li>
  147. <li class="right" >
  148. <a href="cf.Data.trunc.html" title="cf.Data.trunc"
  149. >next</a> |</li>
  150. <li class="right" >
  151. <a href="cf.Data.to_memory.html" title="cf.Data.to_memory"
  152. >previous</a> |</li>
  153. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  154. <li><select onchange="location = this.options[this.selectedIndex].value;">
  155. <option value="../../1.0/index.html"selected>1.0
  156. <option value="../../0.9.9/index.html">0.9.9
  157. <option value="../../0.9.8.3/index.html">0.9.8.3
  158. <option value="../../archive.html">Archive
  159. </select>
  160. </li>
  161. <li><a href="../index.html">Documentation</a> &raquo;</li>
  162. <li><a href="../reference.html" >Reference manual</a> &raquo;</li>
  163. <li><a href="../class.html" >Classes of the <tt class="docutils literal"><span class="pre">cf</span></tt> module</a> &raquo;</li>
  164. <li><a href="../classes/cf.Data.html" >cf.Data</a> &raquo;</li>
  165. </ul>
  166. </div>
  167. <div class="footer">
  168. &copy; Copyright 2015, David Hassell.
  169. Last updated on May 27, 2015.
  170. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
  171. </div>
  172. </body>
  173. </html>