PageRenderTime 25ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/2.0/generated/cf.Field.equivalent.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 241 lines | 197 code | 14 blank | 30 comment | 0 complexity | b03dd22eec844b5184946929c2670ece 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.equivalent &#8212; 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: '2.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true,
  16. SOURCELINK_SUFFIX: '.txt'
  17. };
  18. </script>
  19. <script type="text/javascript" src="../_static/jquery.js"></script>
  20. <script type="text/javascript" src="../_static/underscore.js"></script>
  21. <script type="text/javascript" src="../_static/doctools.js"></script>
  22. <script type="text/javascript" src="../_static/copybutton.js"></script>
  23. <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  24. <link rel="index" title="Index" href="../genindex.html" />
  25. <link rel="search" title="Search" href="../search.html" />
  26. <link rel="next" title="cf.Field.equivalent_data" href="cf.Field.equivalent_data.html" />
  27. <link rel="prev" title="cf.Field.equals" href="cf.Field.equals.html" />
  28. </head>
  29. <body role="document">
  30. <div class="related" role="navigation" aria-label="related navigation">
  31. <h3>Navigation</h3>
  32. <ul>
  33. <li class="right" style="margin-right: 10px">
  34. <a href="../genindex.html" title="General Index"
  35. accesskey="I">index</a></li>
  36. <li class="right" >
  37. <a href="cf.Field.equivalent_data.html" title="cf.Field.equivalent_data"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="cf.Field.equals.html" title="cf.Field.equals"
  41. accesskey="P">previous</a> |</li>
  42. <li><a target="_blank" href="../../archive.html">Archive</a> &laquo;</li>
  43. <li><a target="_blank" href="http://cfpython.bitbucket.io">cf-python 2.0</a> &raquo;</li>
  44. <!--
  45. <li><a target="_blank" href="http://cfpython.bitbucket.io">cf-python</a> &raquo;</li>
  46. <li><select onchange="location = this.options[this.selectedIndex].value;">
  47. <option value="../../1.0/index.html">1.0
  48. <option value="../../0.9.9/index.html">0.9.9
  49. <option value="../../0.9.8.3/index.html">0.9.8.3
  50. <option value="../../archive.html">Archive
  51. </select>
  52. </li>
  53. -->
  54. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &#187;</li>
  55. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &#187;</li>
  56. <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> &#187;</li>
  57. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" accesskey="U">cf.Field</a> &#187;</li>
  58. </ul>
  59. </div>
  60. <div class="document">
  61. <div class="documentwrapper">
  62. <div class="bodywrapper">
  63. <div class="body" role="main">
  64. <div class="section" id="cf-field-equivalent">
  65. <h1>cf.Field.equivalent<a class="headerlink" href="#cf-field-equivalent" title="Permalink to this headline">Âś</a></h1>
  66. <dl class="method">
  67. <dt id="cf.Field.equivalent">
  68. <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>
  69. <dd><p>True if two fields are equivalent, False otherwise</p>
  70. <p>two fields are equivalent if:</p>
  71. <blockquote>
  72. <div><ul class="simple">
  73. <li>They have the same identity, as defined by their
  74. <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>
  75. <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>
  76. <li>Their data arrays are the same after accounting for different but
  77. equivalent:<ul>
  78. <li>Units</li>
  79. <li>Number of size one dimensions (if <em>squeeze</em> is True),</li>
  80. <li>Dimension directions (if <em>use_directions</em> is True)</li>
  81. <li>Dimension orders (if <em>transpose</em> is set to a dictionary).</li>
  82. </ul>
  83. </li>
  84. <li>Both fields&#8217; domains must have the same rankdimensionality and where a
  85. dimension in one field has an identity inferred a 1-d coordinate,
  86. the other field has a matching dimension whose identity inferred
  87. is inferred from a 1-d coordinate with an equivalent data array.<ul>
  88. <li>The rank, as given by their <a href="#id1"><span class="problematic" id="id2">`</span></a>~cf.Field.rank</li>
  89. </ul>
  90. </li>
  91. </ul>
  92. </div></blockquote>
  93. <div class="admonition seealso">
  94. <p class="first admonition-title">See also</p>
  95. <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>
  96. </div>
  97. <table class="docutils field-list" frame="void" rules="none">
  98. <col class="field-name" />
  99. <col class="field-body" />
  100. <tbody valign="top">
  101. <tr class="field-odd field"><th class="field-name">Examples 1:</th><td class="field-body"></td>
  102. </tr>
  103. </tbody>
  104. </table>
  105. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </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>
  106. </pre></div>
  107. </div>
  108. <table class="docutils field-list" frame="void" rules="none">
  109. <col class="field-name" />
  110. <col class="field-body" />
  111. <tbody valign="top">
  112. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
  113. <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>
  114. <dd><p class="first last">The object to compare for equivalence.</p>
  115. </dd>
  116. <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>
  117. <dd><p class="first last">The absolute tolerance for all numerical comparisons, By
  118. 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
  119. used.</p>
  120. </dd>
  121. <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>
  122. <dd><p class="first last">The relative tolerance for all numerical comparisons, By
  123. 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
  124. used.</p>
  125. </dd>
  126. <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>
  127. <dd><p class="first last">If True then print a traceback highlighting where the two
  128. fields differ.</p>
  129. </dd>
  130. </dl>
  131. </td>
  132. </tr>
  133. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
  134. <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>
  135. <dd><p class="first last">Whether or not the two fields are equivalent.</p>
  136. </dd>
  137. </dl>
  138. </td>
  139. </tr>
  140. <tr class="field-odd field"><th class="field-name">Examples 2:</th><td class="field-body"></td>
  141. </tr>
  142. </tbody>
  143. </table>
  144. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="go">&gt;&gt;&gt;</span>
  145. </pre></div>
  146. </div>
  147. </dd></dl>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  153. <div class="sphinxsidebarwrapper">
  154. <h4>Previous topic</h4>
  155. <p class="topless"><a href="cf.Field.equals.html"
  156. title="previous chapter">cf.Field.equals</a></p>
  157. <h4>Next topic</h4>
  158. <p class="topless"><a href="cf.Field.equivalent_data.html"
  159. title="next chapter">cf.Field.equivalent_data</a></p>
  160. <div role="note" aria-label="source link">
  161. <h3>This Page</h3>
  162. <ul class="this-page-menu">
  163. <li><a href="../_sources/generated/cf.Field.equivalent.rst.txt"
  164. rel="nofollow">Show Source</a></li>
  165. </ul>
  166. </div>
  167. <div id="searchbox" style="display: none" role="search">
  168. <h3>Quick search</h3>
  169. <form class="search" action="../search.html" method="get">
  170. <div><input type="text" name="q" /></div>
  171. <div><input type="submit" value="Go" /></div>
  172. <input type="hidden" name="check_keywords" value="yes" />
  173. <input type="hidden" name="area" value="default" />
  174. </form>
  175. </div>
  176. <script type="text/javascript">$('#searchbox').show(0);</script>
  177. </div>
  178. </div>
  179. <div class="clearer"></div>
  180. </div>
  181. <div class="related" role="navigation" aria-label="related navigation">
  182. <h3>Navigation</h3>
  183. <ul>
  184. <li class="right" style="margin-right: 10px">
  185. <a href="../genindex.html" title="General Index"
  186. >index</a></li>
  187. <li class="right" >
  188. <a href="cf.Field.equivalent_data.html" title="cf.Field.equivalent_data"
  189. >next</a> |</li>
  190. <li class="right" >
  191. <a href="cf.Field.equals.html" title="cf.Field.equals"
  192. >previous</a> |</li>
  193. <li><a target="_blank" href="../../archive.html">Archive</a> &laquo;</li>
  194. <li><a target="_blank" href="http://cfpython.bitbucket.io">cf-python 2.0</a> &raquo;</li>
  195. <!--
  196. <li><a target="_blank" href="http://cfpython.bitbucket.io">cf-python</a> &raquo;</li>
  197. <li><select onchange="location = this.options[this.selectedIndex].value;">
  198. <option value="../../1.0/index.html">1.0
  199. <option value="../../0.9.9/index.html">0.9.9
  200. <option value="../../0.9.8.3/index.html">0.9.8.3
  201. <option value="../../archive.html">Archive
  202. </select>
  203. </li>
  204. -->
  205. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &#187;</li>
  206. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &#187;</li>
  207. <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> &#187;</li>
  208. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" >cf.Field</a> &#187;</li>
  209. </ul>
  210. </div>
  211. <div class="footer" role="contentinfo">
  212. &#169; Copyright 2016, David Hassell.
  213. Last updated on Jul 07, 2017.
  214. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.1.
  215. </div>
  216. </body>
  217. </html>