/docs/1.2.3/generated/cf.Field.remove_axes.html
HTML | 287 lines | 243 code | 14 blank | 30 comment | 0 complexity | f4d711cc7f666130a1e8d8aaf9f29d39 MD5 | raw file
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title>cf.Field.remove_axes — Documentation</title>
-
- <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
- <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
-
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT: '../',
- VERSION: '1.2.3',
- COLLAPSE_INDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="../_static/jquery.js"></script>
- <script type="text/javascript" src="../_static/underscore.js"></script>
- <script type="text/javascript" src="../_static/doctools.js"></script>
- <script type="text/javascript" src="../_static/copybutton.js"></script>
- <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
- <link rel="top" title="Documentation" href="../index.html" />
- <link rel="up" title="cf.Field" href="../classes/cf.Field.html" />
- <link rel="next" title="cf.Field.remove_axis" href="cf.Field.remove_axis.html" />
- <link rel="prev" title="cf.Field.period" href="cf.Field.period.html" />
- </head>
- <body role="document">
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="../genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="cf.Field.remove_axis.html" title="cf.Field.remove_axis"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="cf.Field.period.html" title="cf.Field.period"
- accesskey="P">previous</a> |</li>
- <li><a target="_blank" href="../../archive.html">Archive</a> «</li>
- <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.2.3</a> »</li>
- <!--
- <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> »</li>
- <li><select onchange="location = this.options[this.selectedIndex].value;">
- <option value="../../1.0/index.html">1.0
- <option value="../../0.9.9/index.html">0.9.9
- <option value="../../0.9.8.3/index.html">0.9.8.3
- <option value="../../archive.html">Archive
- </select>
- </li>
- -->
-
- <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> »</li>
- <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> »</li>
- <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> »</li>
- <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" accesskey="U">cf.Field</a> »</li>
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body" role="main">
-
- <div class="section" id="cf-field-remove-axes">
- <h1>cf.Field.remove_axes<a class="headerlink" href="#cf-field-remove-axes" title="Permalink to this headline">Âś</a></h1>
- <dl class="method">
- <dt id="cf.Field.remove_axes">
- <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>
- <dd><p>Remove and return axes from the field.</p>
- <p>By default all axes of the domain are removed, but particular axes may
- be selected with the keyword arguments.</p>
- <p>The axis may be selected with the keyword arguments. If no unique axis
- 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>
- <p>If an axis has size greater than 1 then it is not possible to remove
- it if it is spanned by the field’s data array or any multidimensional
- coordinate or cell measure object of the field.</p>
- <div class="admonition seealso">
- <p class="first admonition-title">See also</p>
- <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>
- </div>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
- <dt>axes, kwargs: optional</dt>
- <dd><p class="first">Select axes. The <em>axes</em> parameter may be one, or a sequence,
- of:</p>
- <blockquote>
- <div><ul class="simple">
- <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
- then all axes are selected. This is the default.</li>
- </ul>
- </div></blockquote>
- <blockquote>
- <div><ul>
- <li><p class="first">An integer. Explicitly selects the axis corresponding to
- the given position in the list of axes of the field’s data
- array.</p>
- <blockquote>
- <div><dl class="docutils">
- <dt><em>Example:</em></dt>
- <dd><p class="first last">To select the third data array axis: <code class="docutils literal"><span class="pre">axes=2</span></code>. To
- select the last axis: <code class="docutils literal"><span class="pre">axes=-1</span></code>.</p>
- </dd>
- </dl>
- </div></blockquote>
- </li>
- </ul>
- </div></blockquote>
- <blockquote>
- <div><ul>
- <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
- corresponding to the given positions in the list of axes
- of the field’s data array.</p>
- <blockquote>
- <div><dl class="docutils">
- <dt><em>Example:</em> </dt>
- <dd><p class="first last">To select the last three data array axes:
- <code class="docutils literal"><span class="pre">axes=slice(-3,</span> <span class="pre">None)</span></code></p>
- </dd>
- </dl>
- </div></blockquote>
- </li>
- </ul>
- </div></blockquote>
- <blockquote>
- <div><ul>
- <li><p class="first">A domain axis identifier. Explicitly selects this axis.</p>
- <blockquote>
- <div><dl class="docutils">
- <dt><em>Example:</em></dt>
- <dd><p class="first last">To select axis “dim1”: <code class="docutils literal"><span class="pre">axes='dim1'</span></code>.</p>
- </dd>
- </dl>
- </div></blockquote>
- </li>
- </ul>
- </div></blockquote>
- <blockquote>
- <div><ul>
- <li><p class="first">Any value accepted by the <em>items</em> parameter of the field’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> method. Used in conjunction with the <em>kwargs</em>
- parameters to select the axes which span the items that
- would be identified by this call of the field’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>
- 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
- <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>
- <blockquote>
- <div><dl class="docutils">
- <dt><em>Example:</em></dt>
- <dd><p class="first last">To select the axes spanned by one dimensionsal time
- coordinates: <code class="docutils literal"><span class="pre">f.remove_axes('T',</span> <span class="pre">ndim=1)</span></code>.</p>
- </dd>
- </dl>
- </div></blockquote>
- </li>
- </ul>
- </div></blockquote>
- <p class="last">If <em>axes</em> is a sequence of any combination of the above then
- the selected axes are the union of those selected by each
- element of the sequence. If the sequence is empty then no axes
- are selected.</p>
- </dd>
- <dt>size: optional</dt>
- <dd><p class="first">Select axes whose sizes equal <em>size</em>. Axes whose sizes lie
- 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>
- object.</p>
- <blockquote class="last">
- <div><dl class="docutils">
- <dt><em>Example:</em> </dt>
- <dd><p class="first last"><code class="docutils literal"><span class="pre">size=1</span></code> selects size 1 axes.</p>
- </dd>
- <dt><em>Example:</em></dt>
- <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
- (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>
- </dd>
- </dl>
- </div></blockquote>
- </dd>
- </dl>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
- <dt>out: set</dt>
- <dd><p class="first last">The removed axes. The set may be empty.</p>
- </dd>
- </dl>
- </td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Examples:</th><td class="field-body"></td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </div>
- </div>
- </div>
- </div>
- <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
- <div class="sphinxsidebarwrapper">
- <h4>Previous topic</h4>
- <p class="topless"><a href="cf.Field.period.html"
- title="previous chapter">cf.Field.period</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="cf.Field.remove_axis.html"
- title="next chapter">cf.Field.remove_axis</a></p>
- <div role="note" aria-label="source link">
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="../_sources/generated/cf.Field.remove_axes.txt"
- rel="nofollow">Show Source</a></li>
- </ul>
- </div>
- <div id="searchbox" style="display: none" role="search">
- <h3>Quick search</h3>
- <form class="search" action="../search.html" method="get">
- <input type="text" name="q" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="../genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="cf.Field.remove_axis.html" title="cf.Field.remove_axis"
- >next</a> |</li>
- <li class="right" >
- <a href="cf.Field.period.html" title="cf.Field.period"
- >previous</a> |</li>
- <li><a target="_blank" href="../../archive.html">Archive</a> «</li>
- <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.2.3</a> »</li>
- <!--
- <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> »</li>
- <li><select onchange="location = this.options[this.selectedIndex].value;">
- <option value="../../1.0/index.html">1.0
- <option value="../../0.9.9/index.html">0.9.9
- <option value="../../0.9.8.3/index.html">0.9.8.3
- <option value="../../archive.html">Archive
- </select>
- </li>
- -->
-
- <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> »</li>
- <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> »</li>
- <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> »</li>
- <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" >cf.Field</a> »</li>
- </ul>
- </div>
- <div class="footer" role="contentinfo">
- © Copyright 2016, David Hassell.
- Last updated on Aug 23, 2016.
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.1.
- </div>
- </body>
- </html>