PageRenderTime 40ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/1.2.3/generated/cf.Field.remove_axes.html

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