Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 82fd441cd3f2a8bc33fc3ed41403eced > files > 1291

python-astropy-0.2.4-4.mga4.x86_64.rpm


<!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>table_column_to_votable_datatype &mdash; Astropy v0.2.4</title>
    
    <link rel="stylesheet" href="../_static/bootstrap-astropy.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.2.4',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </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/sidebar.js"></script>
    <link rel="shortcut icon" href="../_static/astropy_logo.ico"/>
    <link rel="top" title="Astropy v0.2.4" href="../index.html" />
    <link rel="up" title="VOTable XML handling (astropy.io.votable)" href="../io/votable/index.html" />
    <link rel="next" title="Converter" href="astropy.io.votable.converters.Converter.html" />
    <link rel="prev" title="get_converter" href="astropy.io.votable.converters.get_converter.html" /> 
  </head>
  <body>
<div class="topbar">
  <a class="brand" title="Documentation Home" href="../index.html"></a>
  <ul>
    <li><a class="homelink" title="AstroPy Homepage" href="http://www.astropy.org"></a></li>
    <li><a title="General Index" href="../genindex.html">Index</a></li>
    <li><a title="Python Module Index" href="../py-modindex.html">Modules</a></li>
    <li>
      
      
<form action="../search.html" method="get">
  <input type="text" name="q" placeholder="Search" />
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
      
    </li>
  </ul>
</div>

<div class="related">
    <h3>Navigation</h3>
    <ul>
      <li class="right">
	<a href="astropy.io.votable.converters.Converter.html" title="Converter">
	  next &raquo;
	</a>
      </li>
      <li class="right">
	<a href="astropy.io.votable.converters.get_converter.html" title="get_converter">
	  &laquo; previous
	</a>
	 |
      </li>
      <li>
	<a href="../index.html">Astropy v0.2.4</a>
	 &raquo;
      </li>
      <li><a href="../io/votable/index.html" accesskey="U">VOTable XML handling (<tt class="docutils literal"><span class="pre">astropy.io.votable</span></tt>)</a> &raquo;</li>
      
      <li>table_column_to_votable_datatype</li> 
    </ul>
</div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="table-column-to-votable-datatype">
<h1>table_column_to_votable_datatype<a class="headerlink" href="#table-column-to-votable-datatype" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="astropy.io.votable.converters.table_column_to_votable_datatype">
<tt class="descclassname">astropy.io.votable.converters.</tt><tt class="descname">table_column_to_votable_datatype</tt><big>(</big><em>column</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/io/votable/converters.py#L1309" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/io/votable/converters.html#table_column_to_votable_datatype"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.io.votable.converters.table_column_to_votable_datatype" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a <tt class="xref py py-obj docutils literal"><span class="pre">astropy.table.Column</span></tt> instance, returns the attributes
necessary to create a VOTable FIELD element that corresponds to
the type of the column.</p>
<p>This necessarily must perform some heuristics to determine the
type of variable length arrays fields, since they are not directly
supported by Numpy.</p>
<p>If the column has dtype of &#8220;object&#8221;, it performs the following
tests:</p>
<blockquote>
<div><ul class="simple">
<li>If all elements are byte or unicode strings, it creates a
variable-length byte or unicode field, respectively.</li>
<li>If all elements are numpy arrays of the same dtype and with a
consistent shape in all but the first dimension, it creates a
variable length array of fixed sized arrays.  If the dtypes
match, but the shapes do not, a variable length array is
created.</li>
</ul>
</div></blockquote>
<p>If the dtype of the input is not understood, it sets the data type
to the most inclusive: a variable length unicodeChar array.</p>
<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"><p class="first"><strong>column</strong> : <tt class="xref py py-obj docutils literal"><span class="pre">astropy.table.Column</span></tt> instance</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>attributes</strong> : dict</p>
<blockquote class="last">
<div><p>A dict containing &#8216;datatype&#8217; and &#8216;arraysize&#8217; keys that can be
set on a VOTable FIELD element.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper"><h3>Page Contents</h3>
<ul>
<li><a class="reference internal" href="#">table_column_to_votable_datatype</a></li>
</ul>


        </div>
      </div>
      <div class="clearer"></div>
    </div>
<footer class="footer">
  <p class="pull-right">
    <a href="../_sources/_generated/astropy.io.votable.converters.table_column_to_votable_datatype.txt"
       rel="nofollow">Page Source</a> &nbsp;
    <a href="#">Back to Top</a></p>
  <p>
    &copy; Copyright 2011-2013, The Astropy Developers.<br/>
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. &nbsp;
    Last built 22 Oct 2013. <br/>
  </p>
</footer>
  </body>
</html>