/docs/2.0/generated/cf.Field.equivalent.html
HTML | 241 lines | 197 code | 14 blank | 30 comment | 0 complexity | b03dd22eec844b5184946929c2670ece 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.equivalent — 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: '2.0',
- COLLAPSE_INDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true,
- SOURCELINK_SUFFIX: '.txt'
- };
- </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="index" title="Index" href="../genindex.html" />
- <link rel="search" title="Search" href="../search.html" />
- <link rel="next" title="cf.Field.equivalent_data" href="cf.Field.equivalent_data.html" />
- <link rel="prev" title="cf.Field.equals" href="cf.Field.equals.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.equivalent_data.html" title="cf.Field.equivalent_data"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="cf.Field.equals.html" title="cf.Field.equals"
- accesskey="P">previous</a> |</li>
- <li><a target="_blank" href="../../archive.html">Archive</a> «</li>
- <li><a target="_blank" href="http://cfpython.bitbucket.io">cf-python 2.0</a> »</li>
- <!--
- <li><a target="_blank" href="http://cfpython.bitbucket.io">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-equivalent">
- <h1>cf.Field.equivalent<a class="headerlink" href="#cf-field-equivalent" title="Permalink to this headline">Âś</a></h1>
- <dl class="method">
- <dt id="cf.Field.equivalent">
- <code class="descclassname">Field.</code><code class="descname">equivalent</code><span class="sig-paren">(</span><em>other</em>, <em>rtol=None</em>, <em>atol=None</em>, <em>traceback=False</em><span class="sig-paren">)</span><a class="reference external" href="https://bitbucket.org/cfpython/cf-python/src/v2.0/cf/field.py#field.py-7362"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.Field.equivalent" title="Permalink to this definition">Âś</a></dt>
- <dd><p>True if two fields are equivalent, False otherwise</p>
- <p>two fields are equivalent if:</p>
- <blockquote>
- <div><ul class="simple">
- <li>They have the same identity, as defined by their
- <a class="reference internal" href="cf.Field.identity.html#cf.Field.identity" title="cf.Field.identity"><code class="xref py py-obj docutils literal"><span class="pre">identity</span></code></a> methods.</li>
- <li>The same rank, as given by their <a class="reference internal" href="cf.Field.rank.html#cf.Field.rank" title="cf.Field.rank"><code class="xref py py-obj docutils literal"><span class="pre">rank</span></code></a> attributes.</li>
- <li>Their data arrays are the same after accounting for different but
- equivalent:<ul>
- <li>Units</li>
- <li>Number of size one dimensions (if <em>squeeze</em> is True),</li>
- <li>Dimension directions (if <em>use_directions</em> is True)</li>
- <li>Dimension orders (if <em>transpose</em> is set to a dictionary).</li>
- </ul>
- </li>
- <li>Both fields’ domains must have the same rankdimensionality and where a
- dimension in one field has an identity inferred a 1-d coordinate,
- the other field has a matching dimension whose identity inferred
- is inferred from a 1-d coordinate with an equivalent data array.<ul>
- <li>The rank, as given by their <a href="#id1"><span class="problematic" id="id2">`</span></a>~cf.Field.rank</li>
- </ul>
- </li>
- </ul>
- </div></blockquote>
- <div class="admonition seealso">
- <p class="first admonition-title">See also</p>
- <p class="last"><a class="reference internal" href="cf.Field.equals.html#cf.Field.equals" title="cf.Field.equals"><code class="xref py py-obj docutils literal"><span class="pre">equals</span></code></a>, <code class="xref py py-obj docutils literal"><span class="pre">set_equals</span></code></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">Examples 1:</th><td class="field-body"></td>
- </tr>
- </tbody>
- </table>
- <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">equivalent</span><span class="p">(</span><span class="n">g</span><span class="p">)</span>
- </pre></div>
- </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>other: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">object</span></code></a></dt>
- <dd><p class="first last">The object to compare for equivalence.</p>
- </dd>
- <dt>atol: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">float</span></code></a>, optional</dt>
- <dd><p class="first last">The absolute tolerance for all numerical comparisons, By
- default the value returned by the <a class="reference internal" href="cf.ATOL.html#cf.ATOL" title="cf.ATOL"><code class="xref py py-obj docutils literal"><span class="pre">cf.ATOL</span></code></a> function is
- used.</p>
- </dd>
- <dt>rtol: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">float</span></code></a>, optional</dt>
- <dd><p class="first last">The relative tolerance for all numerical comparisons, By
- default the value returned by the <a class="reference internal" href="cf.RTOL.html#cf.RTOL" title="cf.RTOL"><code class="xref py py-obj docutils literal"><span class="pre">cf.RTOL</span></code></a> function is
- used.</p>
- </dd>
- <dt>traceback: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">bool</span></code></a>, optional</dt>
- <dd><p class="first last">If True then print a traceback highlighting where the two
- fields differ.</p>
- </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: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">bool</span></code></a></dt>
- <dd><p class="first last">Whether or not the two fields are equivalent.</p>
- </dd>
- </dl>
- </td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Examples 2:</th><td class="field-body"></td>
- </tr>
- </tbody>
- </table>
- <div class="highlight-python"><div class="highlight"><pre><span></span><span class="go">>>></span>
- </pre></div>
- </div>
- </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.equals.html"
- title="previous chapter">cf.Field.equals</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="cf.Field.equivalent_data.html"
- title="next chapter">cf.Field.equivalent_data</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.equivalent.rst.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">
- <div><input type="text" name="q" /></div>
- <div><input type="submit" value="Go" /></div>
- <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.equivalent_data.html" title="cf.Field.equivalent_data"
- >next</a> |</li>
- <li class="right" >
- <a href="cf.Field.equals.html" title="cf.Field.equals"
- >previous</a> |</li>
- <li><a target="_blank" href="../../archive.html">Archive</a> «</li>
- <li><a target="_blank" href="http://cfpython.bitbucket.io">cf-python 2.0</a> »</li>
- <!--
- <li><a target="_blank" href="http://cfpython.bitbucket.io">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 Jul 07, 2017.
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.1.
- </div>
- </body>
- </html>