PageRenderTime 47ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/1.1.10/generated/cf.Field.remove_axis.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 287 lines | 243 code | 14 blank | 30 comment | 0 complexity | 024dcd9d39765d3ab50243eb613ba339 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.Field.remove_axis &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.Field" href="../classes/cf.Field.html" />
  25. <link rel="next" title="cf.Field.aux" href="cf.Field.aux.html" />
  26. <link rel="prev" title="cf.Field.remove_axes" href="cf.Field.remove_axes.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.Field.aux.html" title="cf.Field.aux"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="cf.Field.remove_axes.html" title="cf.Field.remove_axes"
  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.Field.html" accesskey="U">cf.Field</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-field-remove-axis">
  63. <h1>cf.Field.remove_axis<a class="headerlink" href="#cf-field-remove-axis" title="Permalink to this headline">Âś</a></h1>
  64. <dl class="method">
  65. <dt id="cf.Field.remove_axis">
  66. <code class="descclassname">Field.</code><code class="descname">remove_axis</code><span class="sig-paren">(</span><em>axes=None</em>, <em>size=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference external" href="https://bitbucket.org/cfpython/cf-python/src/v1.1.10/cf/field.py#field.py-10262"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.Field.remove_axis" title="Permalink to this definition">Âś</a></dt>
  67. <dd><p>Remove and return a unique axis from the field.</p>
  68. <p>The axis may be selected with the keyword arguments. If no unique axis
  69. can be found then no axis is removed and <a class="reference external" href="http://docs.python.org/2.7/library/constants.html#None" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">None</span></code></a> is returned.</p>
  70. <p>If the axis has size greater than 1 then it is not possible to remove
  71. it if it is spanned by the field&#8217;s data array or any multidimensional
  72. coordinate or cell measure object of the field.</p>
  73. <div class="admonition seealso">
  74. <p class="first admonition-title">See also</p>
  75. <p class="last"><a class="reference internal" href="cf.Field.axis.html#cf.Field.axis" title="cf.Field.axis"><code class="xref py py-obj docutils literal"><span class="pre">axis</span></code></a>, <a class="reference internal" href="cf.Field.remove_axes.html#cf.Field.remove_axes" title="cf.Field.remove_axes"><code class="xref py py-obj docutils literal"><span class="pre">remove_axes</span></code></a>, <a class="reference internal" href="cf.Field.remove_item.html#cf.Field.remove_item" title="cf.Field.remove_item"><code class="xref py py-obj docutils literal"><span class="pre">remove_item</span></code></a>, <a class="reference internal" href="cf.Field.remove_items.html#cf.Field.remove_items" title="cf.Field.remove_items"><code class="xref py py-obj docutils literal"><span class="pre">remove_items</span></code></a></p>
  76. </div>
  77. <table class="docutils field-list" frame="void" rules="none">
  78. <col class="field-name" />
  79. <col class="field-body" />
  80. <tbody valign="top">
  81. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
  82. <dt>axes, kwargs <span class="classifier-delimiter">:</span> <span class="classifier"><em>optional</em></span></dt>
  83. <dd><p class="first">Select axes. The <em>axes</em> parameter may be one, or a sequence,
  84. of:</p>
  85. <blockquote>
  86. <div><ul class="simple">
  87. <li><a class="reference external" href="http://docs.python.org/2.7/library/constants.html#None" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">None</span></code></a>. If no <em>kwargs</em> arguments have been set
  88. then all axes are selected. This is the default.</li>
  89. </ul>
  90. </div></blockquote>
  91. <blockquote>
  92. <div><ul>
  93. <li><p class="first">An integer. Explicitly selects the axis corresponding to
  94. the given position in the list of axes of the field&#8217;s data
  95. array.</p>
  96. <blockquote>
  97. <div><dl class="docutils">
  98. <dt><em>Example:</em></dt>
  99. <dd><p class="first last">To select the third data array axis: <code class="docutils literal"><span class="pre">axes=2</span></code>. To
  100. select the last axis: <code class="docutils literal"><span class="pre">axes=-1</span></code>.</p>
  101. </dd>
  102. </dl>
  103. </div></blockquote>
  104. </li>
  105. </ul>
  106. </div></blockquote>
  107. <blockquote>
  108. <div><ul>
  109. <li><p class="first">A <a class="reference external" href="http://docs.python.org/2.7/library/functions.html#slice" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">slice</span></code></a> object. Explicitly selects the axes
  110. corresponding to the given positions in the list of axes
  111. of the field&#8217;s data array.</p>
  112. <blockquote>
  113. <div><dl class="docutils">
  114. <dt><em>Example:</em> </dt>
  115. <dd><p class="first last">To select the last three data array axes:
  116. <code class="docutils literal"><span class="pre">axes=slice(-3,</span> <span class="pre">None)</span></code></p>
  117. </dd>
  118. </dl>
  119. </div></blockquote>
  120. </li>
  121. </ul>
  122. </div></blockquote>
  123. <blockquote>
  124. <div><ul>
  125. <li><p class="first">A domain axis identifier. Explicitly selects this axis.</p>
  126. <blockquote>
  127. <div><dl class="docutils">
  128. <dt><em>Example:</em></dt>
  129. <dd><p class="first last">To select axis &#8220;dim1&#8221;: <code class="docutils literal"><span class="pre">axes='dim1'</span></code>.</p>
  130. </dd>
  131. </dl>
  132. </div></blockquote>
  133. </li>
  134. </ul>
  135. </div></blockquote>
  136. <blockquote>
  137. <div><ul>
  138. <li><p class="first">Any value accepted by the <em>items</em> parameter of the field&#8217;s
  139. <a class="reference internal" href="cf.Field.items.html#cf.Field.items" title="cf.Field.items"><code class="xref py py-obj docutils literal"><span class="pre">items</span></code></a> method. Used in conjunction with the <em>kwargs</em>
  140. parameters to select the axes which span the items that
  141. would be identified by this call of the field&#8217;s <a class="reference internal" href="cf.Field.items.html#cf.Field.items" title="cf.Field.items"><code class="xref py py-obj docutils literal"><span class="pre">items</span></code></a>
  142. method: <code class="docutils literal"><span class="pre">f.items(items=axes,</span> <span class="pre">axes=None,</span> <span class="pre">**kwargs)</span></code>. See
  143. <a class="reference internal" href="cf.Field.items.html#cf.Field.items" title="cf.Field.items"><code class="xref py py-obj docutils literal"><span class="pre">cf.Field.items</span></code></a> for details.</p>
  144. <blockquote>
  145. <div><dl class="docutils">
  146. <dt><em>Example:</em></dt>
  147. <dd><p class="first last">To select the axes spanned by one dimensionsal time
  148. coordinates: <code class="docutils literal"><span class="pre">f.remove_axis('T',</span> <span class="pre">ndim=1)</span></code>.</p>
  149. </dd>
  150. </dl>
  151. </div></blockquote>
  152. </li>
  153. </ul>
  154. </div></blockquote>
  155. <p class="last">If <em>axes</em> is a sequence of any combination of the above then
  156. the selected axes are the union of those selected by each
  157. element of the sequence. If the sequence is empty then no axes
  158. are selected.</p>
  159. </dd>
  160. <dt>size <span class="classifier-delimiter">:</span> <span class="classifier"><em>optional</em></span></dt>
  161. <dd><p class="first">Select axes whose sizes equal <em>size</em>. Axes whose sizes lie
  162. within a range sizes may be selected if <em>size</em> is a <a class="reference internal" href="../classes/cf.Query.html#cf.Query" title="cf.Query"><code class="xref py py-obj docutils literal"><span class="pre">cf.Query</span></code></a>
  163. object.</p>
  164. <blockquote class="last">
  165. <div><dl class="docutils">
  166. <dt><em>Example:</em> </dt>
  167. <dd><p class="first last"><code class="docutils literal"><span class="pre">size=1</span></code> selects size 1 axes.</p>
  168. </dd>
  169. <dt><em>Example:</em></dt>
  170. <dd><p class="first last"><code class="docutils literal"><span class="pre">size=cf.ge(2)</span></code> selects axes with sizes greater than 1
  171. (see <a class="reference internal" href="cf.ge.html#cf.ge" title="cf.ge"><code class="xref py py-obj docutils literal"><span class="pre">cf.ge</span></code></a>).</p>
  172. </dd>
  173. </dl>
  174. </div></blockquote>
  175. </dd>
  176. </dl>
  177. </td>
  178. </tr>
  179. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
  180. <dt>out <span class="classifier-delimiter">:</span> <span class="classifier">str</span></dt>
  181. <dd><p class="first last">The domain identifier of the removed axis, or <a class="reference external" href="http://docs.python.org/2.7/library/constants.html#None" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">None</span></code></a> if there
  182. isn&#8217;t one.</p>
  183. </dd>
  184. </dl>
  185. </td>
  186. </tr>
  187. <tr class="field-odd field"><th class="field-name">Examples:</th><td class="field-body"></td>
  188. </tr>
  189. </tbody>
  190. </table>
  191. </dd></dl>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  197. <div class="sphinxsidebarwrapper">
  198. <h4>Previous topic</h4>
  199. <p class="topless"><a href="cf.Field.remove_axes.html"
  200. title="previous chapter">cf.Field.remove_axes</a></p>
  201. <h4>Next topic</h4>
  202. <p class="topless"><a href="cf.Field.aux.html"
  203. title="next chapter">cf.Field.aux</a></p>
  204. <div role="note" aria-label="source link">
  205. <h3>This Page</h3>
  206. <ul class="this-page-menu">
  207. <li><a href="../_sources/generated/cf.Field.remove_axis.txt"
  208. rel="nofollow">Show Source</a></li>
  209. </ul>
  210. </div>
  211. <div id="searchbox" style="display: none" role="search">
  212. <h3>Quick search</h3>
  213. <form class="search" action="../search.html" method="get">
  214. <input type="text" name="q" />
  215. <input type="submit" value="Go" />
  216. <input type="hidden" name="check_keywords" value="yes" />
  217. <input type="hidden" name="area" value="default" />
  218. </form>
  219. <p class="searchtip" style="font-size: 90%">
  220. Enter search terms or a module, class or function name.
  221. </p>
  222. </div>
  223. <script type="text/javascript">$('#searchbox').show(0);</script>
  224. </div>
  225. </div>
  226. <div class="clearer"></div>
  227. </div>
  228. <div class="related" role="navigation" aria-label="related navigation">
  229. <h3>Navigation</h3>
  230. <ul>
  231. <li class="right" style="margin-right: 10px">
  232. <a href="../genindex.html" title="General Index"
  233. >index</a></li>
  234. <li class="right" >
  235. <a href="cf.Field.aux.html" title="cf.Field.aux"
  236. >next</a> |</li>
  237. <li class="right" >
  238. <a href="cf.Field.remove_axes.html" title="cf.Field.remove_axes"
  239. >previous</a> |</li>
  240. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.10</a> &raquo;</li>
  241. <!--
  242. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  243. <li><select onchange="location = this.options[this.selectedIndex].value;">
  244. <option value="../../1.0/index.html">1.0
  245. <option value="../../0.9.9/index.html">0.9.9
  246. <option value="../../0.9.8.3/index.html">0.9.8.3
  247. <option value="../../archive.html">Archive
  248. </select>
  249. </li>
  250. -->
  251. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  252. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  253. <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>
  254. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" >cf.Field</a> &raquo;</li>
  255. </ul>
  256. </div>
  257. <div class="footer" role="contentinfo">
  258. &copy; Copyright 2016, David Hassell.
  259. Last updated on Jun 23, 2016.
  260. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.5.
  261. </div>
  262. </body>
  263. </html>