def table_column_to_votable_datatype(column):
 if (column.dtype.char == u'O'):
  if isinstance(column[0], bytes):
   if _all_bytes(column[1:]):
    return {u'datatype': u'char', u'arraysize': u'*'}
  elif isinstance(column[0], six.text_type):
   if _all_unicode(column[1:]):
    return {u'datatype': u'unicodeChar', u'arraysize': u'*'}
  elif isinstance(column[0], np.ndarray):
   (dtype, shape) = _all_matching_dtype(column)
   if (dtype is not False):
    result = numpy_to_votable_dtype(dtype, shape)
    if (u'arraysize' not in result):
     result[u'arraysize'] = u'*'
    else:
     result[u'arraysize'] += u'*'
    return result
  return {u'datatype': u'unicodeChar', u'arraysize': u'*'}
 return numpy_to_votable_dtype(column.dtype, column.shape[1:])

def table_column_to_votable_datatype ( column ) : if ( column . dtype . char == u'O' ) : if isinstance ( column [ 0 ] , bytes ) : if _all_bytes ( column [ 1 : ] ) : return { u'datatype' : u'char' , u'arraysize' : u'*' } elif isinstance ( column [ 0 ] , six . text_type ) : if _all_unicode ( column [ 1 : ] ) : return { u'datatype' : u'unicodeChar' , u'arraysize' : u'*' } elif isinstance ( column [ 0 ] , np . ndarray ) : ( dtype , shape ) = _all_matching_dtype ( column ) if ( dtype is not False ) : result = numpy_to_votable_dtype ( dtype , shape ) if ( u'arraysize' not in result ) : result [ u'arraysize' ] = u'*' else : result [ u'arraysize' ] += u'*' return result return { u'datatype' : u'unicodeChar' , u'arraysize' : u'*' } return numpy_to_votable_dtype ( column . dtype , column . shape [ 1 : ] )
given a astropy .