PageRenderTime 55ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/1.0/generated/cf.Variable.month_lengths.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 177 lines | 153 code | 24 blank | 0 comment | 0 complexity | 56a721c3b11244c9d6e9ac8e1c04f68b 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.Variable.month_lengths &mdash; Documentation</title>
  7. <link rel="stylesheet" href="../_static/default.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.0',
  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="http://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.Variable" href="../classes/cf.Variable.html" />
  25. <link rel="next" title="cf.Variable.scale_factor" href="cf.Variable.scale_factor.html" />
  26. <link rel="prev" title="cf.Variable.missing_value" href="cf.Variable.missing_value.html" />
  27. </head>
  28. <body>
  29. <div class="related">
  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.Variable.scale_factor.html" title="cf.Variable.scale_factor"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="cf.Variable.missing_value.html" title="cf.Variable.missing_value"
  40. accesskey="P">previous</a> |</li>
  41. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  42. <li><select onchange="location = this.options[this.selectedIndex].value;">
  43. <option value="../../1.0/index.html"selected>1.0
  44. <option value="../../0.9.9/index.html">0.9.9
  45. <option value="../../0.9.8.3/index.html">0.9.8.3
  46. <option value="../../archive.html">Archive
  47. </select>
  48. </li>
  49. <li><a href="../index.html">Documentation</a> &raquo;</li>
  50. <li><a href="../reference.html" >Reference manual</a> &raquo;</li>
  51. <li><a href="../class.html" >Classes of the <tt class="docutils literal"><span class="pre">cf</span></tt> module</a> &raquo;</li>
  52. <li><a href="../classes/cf.Variable.html" accesskey="U">cf.Variable</a> &raquo;</li>
  53. </ul>
  54. </div>
  55. <div class="document">
  56. <div class="documentwrapper">
  57. <div class="bodywrapper">
  58. <div class="body">
  59. <div class="section" id="cf-variable-month-lengths">
  60. <h1>cf.Variable.month_lengths<a class="headerlink" href="#cf-variable-month-lengths" title="Permalink to this headline">Âś</a></h1>
  61. <dl class="attribute">
  62. <dt id="cf.Variable.month_lengths">
  63. <tt class="descclassname">Variable.</tt><tt class="descname">month_lengths</tt><a class="headerlink" href="#cf.Variable.month_lengths" title="Permalink to this definition">Âś</a></dt>
  64. <dd><p>The month_lengths CF property.</p>
  65. <p>Stored as a tuple but may be set as any array-like object.</p>
  66. <table class="docutils field-list" frame="void" rules="none">
  67. <col class="field-name" />
  68. <col class="field-body" />
  69. <tbody valign="top">
  70. <tr class="field-odd field"><th class="field-name">Examples:</th><td class="field-body"></td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">month_lengths</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">34</span><span class="p">,</span> <span class="mi">31</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mi">29</span><span class="p">,</span> <span class="mi">27</span><span class="p">,</span> <span class="mi">28</span><span class="p">,</span> <span class="mi">28</span><span class="p">,</span> <span class="mi">28</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">34</span><span class="p">])</span>
  75. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">month_lengths</span>
  76. <span class="go">(34, 31, 32, 30, 29, 27, 28, 28, 28, 32, 32, 34)</span>
  77. <span class="gp">&gt;&gt;&gt; </span><span class="k">del</span> <span class="n">f</span><span class="o">.</span><span class="n">month_lengths</span>
  78. </pre></div>
  79. </div>
  80. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">setprop</span><span class="p">(</span><span class="s">&#39;month_lengths&#39;</span><span class="p">,</span> <span class="p">[</span><span class="mi">34</span><span class="p">,</span> <span class="mi">31</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mi">29</span><span class="p">,</span> <span class="mi">27</span><span class="p">,</span> <span class="mi">28</span><span class="p">,</span> <span class="mi">28</span><span class="p">,</span> <span class="mi">28</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">34</span><span class="p">])</span>
  81. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">getprop</span><span class="p">(</span><span class="s">&#39;month_lengths&#39;</span><span class="p">)</span>
  82. <span class="go">(34, 31, 32, 30, 29, 27, 28, 28, 28, 32, 32, 34)</span>
  83. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">delprop</span><span class="p">(</span><span class="s">&#39;month_lengths&#39;</span><span class="p">)</span>
  84. </pre></div>
  85. </div>
  86. </dd></dl>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <div class="sphinxsidebar">
  92. <div class="sphinxsidebarwrapper">
  93. <h4>Previous topic</h4>
  94. <p class="topless"><a href="cf.Variable.missing_value.html"
  95. title="previous chapter">cf.Variable.missing_value</a></p>
  96. <h4>Next topic</h4>
  97. <p class="topless"><a href="cf.Variable.scale_factor.html"
  98. title="next chapter">cf.Variable.scale_factor</a></p>
  99. <h3>This Page</h3>
  100. <ul class="this-page-menu">
  101. <li><a href="../_sources/generated/cf.Variable.month_lengths.txt"
  102. rel="nofollow">Show Source</a></li>
  103. </ul>
  104. <div id="searchbox" style="display: none">
  105. <h3>Quick search</h3>
  106. <form class="search" action="../search.html" method="get">
  107. <input type="text" name="q" />
  108. <input type="submit" value="Go" />
  109. <input type="hidden" name="check_keywords" value="yes" />
  110. <input type="hidden" name="area" value="default" />
  111. </form>
  112. <p class="searchtip" style="font-size: 90%">
  113. Enter search terms or a module, class or function name.
  114. </p>
  115. </div>
  116. <script type="text/javascript">$('#searchbox').show(0);</script>
  117. </div>
  118. </div>
  119. <div class="clearer"></div>
  120. </div>
  121. <div class="related">
  122. <h3>Navigation</h3>
  123. <ul>
  124. <li class="right" style="margin-right: 10px">
  125. <a href="../genindex.html" title="General Index"
  126. >index</a></li>
  127. <li class="right" >
  128. <a href="cf.Variable.scale_factor.html" title="cf.Variable.scale_factor"
  129. >next</a> |</li>
  130. <li class="right" >
  131. <a href="cf.Variable.missing_value.html" title="cf.Variable.missing_value"
  132. >previous</a> |</li>
  133. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  134. <li><select onchange="location = this.options[this.selectedIndex].value;">
  135. <option value="../../1.0/index.html"selected>1.0
  136. <option value="../../0.9.9/index.html">0.9.9
  137. <option value="../../0.9.8.3/index.html">0.9.8.3
  138. <option value="../../archive.html">Archive
  139. </select>
  140. </li>
  141. <li><a href="../index.html">Documentation</a> &raquo;</li>
  142. <li><a href="../reference.html" >Reference manual</a> &raquo;</li>
  143. <li><a href="../class.html" >Classes of the <tt class="docutils literal"><span class="pre">cf</span></tt> module</a> &raquo;</li>
  144. <li><a href="../classes/cf.Variable.html" >cf.Variable</a> &raquo;</li>
  145. </ul>
  146. </div>
  147. <div class="footer">
  148. &copy; Copyright 2015, David Hassell.
  149. Last updated on May 27, 2015.
  150. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
  151. </div>
  152. </body>
  153. </html>