PageRenderTime 62ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 193 lines | 149 code | 14 blank | 30 comment | 0 complexity | 1427e664be43b85fd9f3f87475560894 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.varray &#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.Units" href="cf.Field.Units.html" />
  27. <link rel="prev" title="cf.Field.size" href="cf.Field.size.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.Units.html" title="cf.Field.Units"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="cf.Field.size.html" title="cf.Field.size"
  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-varray">
  65. <h1>cf.Field.varray<a class="headerlink" href="#cf-field-varray" title="Permalink to this headline">Âś</a></h1>
  66. <dl class="attribute">
  67. <dt id="cf.Field.varray">
  68. <code class="descclassname">Field.</code><code class="descname">varray</code><a class="headerlink" href="#cf.Field.varray" title="Permalink to this definition">Âś</a></dt>
  69. <dd><p>A numpy array view of the data array.</p>
  70. <p>Changing the elements of the returned view changes the data array.</p>
  71. <div class="admonition seealso">
  72. <p class="first admonition-title">See also</p>
  73. <p class="last"><a class="reference internal" href="cf.Field.array.html#cf.Field.array" title="cf.Field.array"><code class="xref py py-obj docutils literal"><span class="pre">array</span></code></a>, <a class="reference internal" href="cf.Field.data.html#cf.Field.data" title="cf.Field.data"><code class="xref py py-obj docutils literal"><span class="pre">data</span></code></a>, <a class="reference internal" href="cf.Field.dtarray.html#cf.Field.dtarray" title="cf.Field.dtarray"><code class="xref py py-obj docutils literal"><span class="pre">dtarray</span></code></a>, <code class="xref py py-obj docutils literal"><span class="pre">dtvarray</span></code></p>
  74. </div>
  75. <table class="docutils field-list" frame="void" rules="none">
  76. <col class="field-name" />
  77. <col class="field-body" />
  78. <tbody valign="top">
  79. <tr class="field-odd field"><th class="field-name">Examples 1:</th><td class="field-body"></td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">data</span>
  84. <span class="go">&lt;CF Data: [0, ... 4] kg m-1 s-2&gt;</span>
  85. <span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  86. <span class="gp">&gt;&gt;&gt; </span><span class="nb">type</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
  87. <span class="go">&lt;type &#39;numpy.ndarray&#39;&gt;</span>
  88. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">a</span>
  89. <span class="go">[0 1 2 3 4]</span>
  90. <span class="gp">&gt;&gt;&gt; </span><span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">999</span>
  91. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">a</span>
  92. <span class="go">[999 1 2 3 4]</span>
  93. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  94. <span class="go">[999 1 2 3 4]</span>
  95. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">data</span>
  96. <span class="go">&lt;CF Data: [999, ... 4] kg m-1 s-2&gt;</span>
  97. </pre></div>
  98. </div>
  99. </dd></dl>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  105. <div class="sphinxsidebarwrapper">
  106. <h4>Previous topic</h4>
  107. <p class="topless"><a href="cf.Field.size.html"
  108. title="previous chapter">cf.Field.size</a></p>
  109. <h4>Next topic</h4>
  110. <p class="topless"><a href="cf.Field.Units.html"
  111. title="next chapter">cf.Field.Units</a></p>
  112. <div role="note" aria-label="source link">
  113. <h3>This Page</h3>
  114. <ul class="this-page-menu">
  115. <li><a href="../_sources/generated/cf.Field.varray.rst.txt"
  116. rel="nofollow">Show Source</a></li>
  117. </ul>
  118. </div>
  119. <div id="searchbox" style="display: none" role="search">
  120. <h3>Quick search</h3>
  121. <form class="search" action="../search.html" method="get">
  122. <div><input type="text" name="q" /></div>
  123. <div><input type="submit" value="Go" /></div>
  124. <input type="hidden" name="check_keywords" value="yes" />
  125. <input type="hidden" name="area" value="default" />
  126. </form>
  127. </div>
  128. <script type="text/javascript">$('#searchbox').show(0);</script>
  129. </div>
  130. </div>
  131. <div class="clearer"></div>
  132. </div>
  133. <div class="related" role="navigation" aria-label="related navigation">
  134. <h3>Navigation</h3>
  135. <ul>
  136. <li class="right" style="margin-right: 10px">
  137. <a href="../genindex.html" title="General Index"
  138. >index</a></li>
  139. <li class="right" >
  140. <a href="cf.Field.Units.html" title="cf.Field.Units"
  141. >next</a> |</li>
  142. <li class="right" >
  143. <a href="cf.Field.size.html" title="cf.Field.size"
  144. >previous</a> |</li>
  145. <li><a target="_blank" href="../../archive.html">Archive</a> &laquo;</li>
  146. <li><a target="_blank" href="http://cfpython.bitbucket.io">cf-python 2.0</a> &raquo;</li>
  147. <!--
  148. <li><a target="_blank" href="http://cfpython.bitbucket.io">cf-python</a> &raquo;</li>
  149. <li><select onchange="location = this.options[this.selectedIndex].value;">
  150. <option value="../../1.0/index.html">1.0
  151. <option value="../../0.9.9/index.html">0.9.9
  152. <option value="../../0.9.8.3/index.html">0.9.8.3
  153. <option value="../../archive.html">Archive
  154. </select>
  155. </li>
  156. -->
  157. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &#187;</li>
  158. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &#187;</li>
  159. <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>
  160. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" >cf.Field</a> &#187;</li>
  161. </ul>
  162. </div>
  163. <div class="footer" role="contentinfo">
  164. &#169; Copyright 2016, David Hassell.
  165. Last updated on Jul 07, 2017.
  166. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.1.
  167. </div>
  168. </body>
  169. </html>