PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 1ms

/docs/1.1.10/generated/cf.Variable.squeeze.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 198 lines | 154 code | 14 blank | 30 comment | 0 complexity | 452f00e18f35911ecdb14d031303f1be 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.Variable.squeeze &mdash; Documentation</title>
  7. <link rel="stylesheet" href="../_static/classic.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.1.10',
  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="https://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.Variable" href="../classes/cf.Variable.html" />
  25. <link rel="next" title="cf.Variable.transpose" href="cf.Variable.transpose.html" />
  26. <link rel="prev" title="cf.Variable.sin" href="cf.Variable.sin.html" />
  27. </head>
  28. <body role="document">
  29. <div class="related" role="navigation" aria-label="related navigation">
  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.Variable.transpose.html" title="cf.Variable.transpose"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="cf.Variable.sin.html" title="cf.Variable.sin"
  40. accesskey="P">previous</a> |</li>
  41. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.10</a> &raquo;</li>
  42. <!--
  43. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  44. <li><select onchange="location = this.options[this.selectedIndex].value;">
  45. <option value="../../1.0/index.html">1.0
  46. <option value="../../0.9.9/index.html">0.9.9
  47. <option value="../../0.9.8.3/index.html">0.9.8.3
  48. <option value="../../archive.html">Archive
  49. </select>
  50. </li>
  51. -->
  52. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  53. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  54. <li class="nav-item nav-item-2"><a href="../class.html" >Classes of the <code class="docutils literal"><span class="pre">cf</span></code> module</a> &raquo;</li>
  55. <li class="nav-item nav-item-3"><a href="../classes/cf.Variable.html" accesskey="U">cf.Variable</a> &raquo;</li>
  56. </ul>
  57. </div>
  58. <div class="document">
  59. <div class="documentwrapper">
  60. <div class="bodywrapper">
  61. <div class="body" role="main">
  62. <div class="section" id="cf-variable-squeeze">
  63. <h1>cf.Variable.squeeze<a class="headerlink" href="#cf-variable-squeeze" title="Permalink to this headline">Âś</a></h1>
  64. <dl class="method">
  65. <dt id="cf.Variable.squeeze">
  66. <code class="descclassname">Variable.</code><code class="descname">squeeze</code><span class="sig-paren">(</span><em>axes=None</em>, <em>i=False</em><span class="sig-paren">)</span><a class="reference external" href="https://bitbucket.org/cfpython/cf-python/src/v1.1.10/cf/variable.py#variable.py-5801"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.Variable.squeeze" title="Permalink to this definition">Âś</a></dt>
  67. <dd><p>Remove size 1 dimensions from the data array in place.</p>
  68. <div class="admonition seealso">
  69. <p class="first admonition-title">See also</p>
  70. <p class="last"><a class="reference internal" href="cf.Variable.expand_dims.html#cf.Variable.expand_dims" title="cf.Variable.expand_dims"><code class="xref py py-obj docutils literal"><span class="pre">expand_dims</span></code></a>, <a class="reference internal" href="cf.Variable.flip.html#cf.Variable.flip" title="cf.Variable.flip"><code class="xref py py-obj docutils literal"><span class="pre">flip</span></code></a>, <a class="reference internal" href="cf.Variable.transpose.html#cf.Variable.transpose" title="cf.Variable.transpose"><code class="xref py py-obj docutils literal"><span class="pre">transpose</span></code></a></p>
  71. </div>
  72. <table class="docutils field-list" frame="void" rules="none">
  73. <col class="field-name" />
  74. <col class="field-body" />
  75. <tbody valign="top">
  76. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
  77. <dt>axes <span class="classifier-delimiter">:</span> <span class="classifier">(sequence of) int, optional</span></dt>
  78. <dd><p class="first last">The size 1 axes to remove. By default, all size 1 axes are
  79. removed. Size 1 axes for removal are identified by their
  80. integer positions in the data array.</p>
  81. </dd>
  82. <dt>i <span class="classifier-delimiter">:</span> <span class="classifier">bool, optional</span></dt>
  83. <dd><p class="first last">If True then update the variable in place. By default a new
  84. variable is created. In either case, a variable is
  85. returned.</p>
  86. </dd>
  87. </dl>
  88. </td>
  89. </tr>
  90. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">out : cf.Variable</p>
  91. </td>
  92. </tr>
  93. <tr class="field-odd field"><th class="field-name">Examples:</th><td class="field-body"></td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">v</span><span class="o">.</span><span class="n">squeeze</span><span class="p">()</span>
  98. <span class="gp">&gt;&gt;&gt; </span><span class="n">v</span><span class="o">.</span><span class="n">squeeze</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
  99. <span class="gp">&gt;&gt;&gt; </span><span class="n">v</span><span class="o">.</span><span class="n">squeeze</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">])</span>
  100. </pre></div>
  101. </div>
  102. </dd></dl>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  108. <div class="sphinxsidebarwrapper">
  109. <h4>Previous topic</h4>
  110. <p class="topless"><a href="cf.Variable.sin.html"
  111. title="previous chapter">cf.Variable.sin</a></p>
  112. <h4>Next topic</h4>
  113. <p class="topless"><a href="cf.Variable.transpose.html"
  114. title="next chapter">cf.Variable.transpose</a></p>
  115. <div role="note" aria-label="source link">
  116. <h3>This Page</h3>
  117. <ul class="this-page-menu">
  118. <li><a href="../_sources/generated/cf.Variable.squeeze.txt"
  119. rel="nofollow">Show Source</a></li>
  120. </ul>
  121. </div>
  122. <div id="searchbox" style="display: none" role="search">
  123. <h3>Quick search</h3>
  124. <form class="search" action="../search.html" method="get">
  125. <input type="text" name="q" />
  126. <input type="submit" value="Go" />
  127. <input type="hidden" name="check_keywords" value="yes" />
  128. <input type="hidden" name="area" value="default" />
  129. </form>
  130. <p class="searchtip" style="font-size: 90%">
  131. Enter search terms or a module, class or function name.
  132. </p>
  133. </div>
  134. <script type="text/javascript">$('#searchbox').show(0);</script>
  135. </div>
  136. </div>
  137. <div class="clearer"></div>
  138. </div>
  139. <div class="related" role="navigation" aria-label="related navigation">
  140. <h3>Navigation</h3>
  141. <ul>
  142. <li class="right" style="margin-right: 10px">
  143. <a href="../genindex.html" title="General Index"
  144. >index</a></li>
  145. <li class="right" >
  146. <a href="cf.Variable.transpose.html" title="cf.Variable.transpose"
  147. >next</a> |</li>
  148. <li class="right" >
  149. <a href="cf.Variable.sin.html" title="cf.Variable.sin"
  150. >previous</a> |</li>
  151. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.10</a> &raquo;</li>
  152. <!--
  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">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. -->
  162. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  163. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  164. <li class="nav-item nav-item-2"><a href="../class.html" >Classes of the <code class="docutils literal"><span class="pre">cf</span></code> module</a> &raquo;</li>
  165. <li class="nav-item nav-item-3"><a href="../classes/cf.Variable.html" >cf.Variable</a> &raquo;</li>
  166. </ul>
  167. </div>
  168. <div class="footer" role="contentinfo">
  169. &copy; Copyright 2016, David Hassell.
  170. Last updated on Jun 23, 2016.
  171. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.5.
  172. </div>
  173. </body>
  174. </html>