PageRenderTime 49ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 239 lines | 195 code | 14 blank | 30 comment | 0 complexity | 4af20e93b87be9a91b81fdf7b47f3752 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 &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.4',
  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.equivalent_data" href="cf.Field.equivalent_data.html" />
  26. <link rel="prev" title="cf.Field.equals" href="cf.Field.equals.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.equivalent_data.html" title="cf.Field.equivalent_data"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="cf.Field.equals.html" title="cf.Field.equals"
  40. accesskey="P">previous</a> |</li>
  41. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.4</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-equivalent">
  63. <h1>cf.Field.equivalent<a class="headerlink" href="#cf-field-equivalent" title="Permalink to this headline">Âś</a></h1>
  64. <dl class="method">
  65. <dt id="cf.Field.equivalent">
  66. <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 internal" href="../_modules/cf/field.html#Field.equivalent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.Field.equivalent" title="Permalink to this definition">Âś</a></dt>
  67. <dd><p>True if two fields are equivalent, False otherwise</p>
  68. <p>two fields are equivalent if:</p>
  69. <blockquote>
  70. <div><ul class="simple">
  71. <li>They have the same identity, as defined by their
  72. <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>
  73. <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>
  74. <li>Their data arrays are the same after accounting for different but
  75. equivalent:<ul>
  76. <li>Units</li>
  77. <li>Number of size one dimensions (if <em>squeeze</em> is True),</li>
  78. <li>Dimension directions (if <em>use_directions</em> is True)</li>
  79. <li>Dimension orders (if <em>transpose</em> is set to a dictionary).</li>
  80. </ul>
  81. </li>
  82. <li>Both fields&#8217; domains must have the same rankdimensionality and where a
  83. dimension in one field has an identity inferred a 1-d coordinate,
  84. the other field has a matching dimension whose identity inferred
  85. is inferred from a 1-d coordinate with an equivalent data array.<ul>
  86. <li>The rank, as given by their <a href="#id1"><span class="problematic" id="id2">`</span></a>~cf.Field.rank</li>
  87. </ul>
  88. </li>
  89. </ul>
  90. </div></blockquote>
  91. <div class="admonition seealso">
  92. <p class="first admonition-title">See also</p>
  93. <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>
  94. </div>
  95. <table class="docutils field-list" frame="void" rules="none">
  96. <col class="field-name" />
  97. <col class="field-body" />
  98. <tbody valign="top">
  99. <tr class="field-odd field"><th class="field-name">Examples 1:</th><td class="field-body"></td>
  100. </tr>
  101. </tbody>
  102. </table>
  103. <div class="highlight-python"><div class="highlight"><pre><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>
  104. </pre></div>
  105. </div>
  106. <table class="docutils field-list" frame="void" rules="none">
  107. <col class="field-name" />
  108. <col class="field-body" />
  109. <tbody valign="top">
  110. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
  111. <dt>other <span class="classifier-delimiter">:</span> <span class="classifier">object</span></dt>
  112. <dd><p class="first last">The object to compare for equivalence.</p>
  113. </dd>
  114. <dt>atol <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
  115. <dd><p class="first last">The absolute tolerance for all numerical comparisons, By
  116. 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>
  117. </dd>
  118. <dt>rtol <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
  119. <dd><p class="first last">The relative tolerance for all numerical comparisons, By
  120. 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>
  121. </dd>
  122. <dt>traceback <span class="classifier-delimiter">:</span> <span class="classifier">bool, optional</span></dt>
  123. <dd><p class="first last">If True then print a traceback highlighting where the two
  124. fields differ.</p>
  125. </dd>
  126. </dl>
  127. </td>
  128. </tr>
  129. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
  130. <dt>out <span class="classifier-delimiter">:</span> <span class="classifier">bool</span></dt>
  131. <dd><p class="first last">Whether or not the two fields are equivalent.</p>
  132. </dd>
  133. </dl>
  134. </td>
  135. </tr>
  136. <tr class="field-odd field"><th class="field-name">Examples 2:</th><td class="field-body"></td>
  137. </tr>
  138. </tbody>
  139. </table>
  140. <div class="highlight-python"><div class="highlight"><pre><span class="go">&gt;&gt;&gt;</span>
  141. </pre></div>
  142. </div>
  143. </dd></dl>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  149. <div class="sphinxsidebarwrapper">
  150. <h4>Previous topic</h4>
  151. <p class="topless"><a href="cf.Field.equals.html"
  152. title="previous chapter">cf.Field.equals</a></p>
  153. <h4>Next topic</h4>
  154. <p class="topless"><a href="cf.Field.equivalent_data.html"
  155. title="next chapter">cf.Field.equivalent_data</a></p>
  156. <div role="note" aria-label="source link">
  157. <h3>This Page</h3>
  158. <ul class="this-page-menu">
  159. <li><a href="../_sources/generated/cf.Field.equivalent.txt"
  160. rel="nofollow">Show Source</a></li>
  161. </ul>
  162. </div>
  163. <div id="searchbox" style="display: none" role="search">
  164. <h3>Quick search</h3>
  165. <form class="search" action="../search.html" method="get">
  166. <input type="text" name="q" />
  167. <input type="submit" value="Go" />
  168. <input type="hidden" name="check_keywords" value="yes" />
  169. <input type="hidden" name="area" value="default" />
  170. </form>
  171. <p class="searchtip" style="font-size: 90%">
  172. Enter search terms or a module, class or function name.
  173. </p>
  174. </div>
  175. <script type="text/javascript">$('#searchbox').show(0);</script>
  176. </div>
  177. </div>
  178. <div class="clearer"></div>
  179. </div>
  180. <div class="related" role="navigation" aria-label="related navigation">
  181. <h3>Navigation</h3>
  182. <ul>
  183. <li class="right" style="margin-right: 10px">
  184. <a href="../genindex.html" title="General Index"
  185. >index</a></li>
  186. <li class="right" >
  187. <a href="cf.Field.equivalent_data.html" title="cf.Field.equivalent_data"
  188. >next</a> |</li>
  189. <li class="right" >
  190. <a href="cf.Field.equals.html" title="cf.Field.equals"
  191. >previous</a> |</li>
  192. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.4</a> &raquo;</li>
  193. <!--
  194. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  195. <li><select onchange="location = this.options[this.selectedIndex].value;">
  196. <option value="../../1.0/index.html">1.0
  197. <option value="../../0.9.9/index.html">0.9.9
  198. <option value="../../0.9.8.3/index.html">0.9.8.3
  199. <option value="../../archive.html">Archive
  200. </select>
  201. </li>
  202. -->
  203. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  204. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  205. <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>
  206. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" >cf.Field</a> &raquo;</li>
  207. </ul>
  208. </div>
  209. <div class="footer" role="contentinfo">
  210. &copy; Copyright 2015, David Hassell.
  211. Last updated on Feb 18, 2016.
  212. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.5.
  213. </div>
  214. </body>
  215. </html>