Sistema de Consulta Abierta
Sistema de consulta abierta con módulo de análisis semántico
 Todo Clases Namespaces Funciones Variables Páginas
Métodos públicos | Atributos públicos | Lista de todos los miembros
Referencia de la Clase vsm.viewer.labeleddata.LabeledColumn
Diagrama de herencias de vsm.viewer.labeleddata.LabeledColumn
Inheritance graph
[significado de colores y flechas]
Diagrama de colaboración para vsm.viewer.labeleddata.LabeledColumn:
Collaboration graph
[significado de colores y flechas]

Métodos públicos

def __new__
 
def __array_finalize__
 
def col_num
 
def col_num
 
def subcol_widths
 
def subcol_widths
 
def col_width
 
def col_len
 
def col_len
 
def __str__
 

Atributos públicos

 col_header
 
 subcol_headers
 
 multi_col
 

Descripción detallada

A subclass of np.ndarray whose purpose is to store labels and
formatting information for a 1-dimensional structured array. It
also provides pretty-printing routines.

A column can have a header and a default display length.

A subcolumn wraps the data found under a given field name. Each
subcolumn has a label and a display width.

:param input_array: Array to be formatted into a LabeledColumn.
:type input_array: 1-dimensional structured array

:param col_header: The title of the object. For example, 'Words: logic'.
    Default is `None`.
:type col_header: string, optional

:param subcol_headers: List of labels that correspond to the fields of 
    the structured array. Default is `None`.
:type subcol_headers: list, optional

:param subcol_widths: List of widths for each subcolumn. If not provided, 
    `subcol_widths` is calculated based on the data-type of the entries.
:type subcol_widths: list, optional

:param col_len: Number of entries to display. If not provided, `col_len`
    is set to length of LabeledColumn.
:type col_len: integer, optional

:param multi_col: If `True` html table version of :class:`LabeledColumn`
    is displayed in multiple columns when the number of entries exceed 15.
    Default is `True`.
:type multi_col: boolean, optional
    
:attributes:
    * **col_header** (string, optional)
        The title of the object. For example, 'Words: logic'.
        Default is `None`.
    * **subcol_headers** (list, optional)
        List of labels that correspond to the fields of 
        the structured array. Default is `None`.
    * **subcol_widths** (list, optional)
        List of widths for each subcolumn. If not provided, 
        `subcol_widths` is calculated based on the data-type of the entries.

    * **col_len** (integer, optional) 
        Number of entries to display. If not provided, `col_len`
        is set to length of LabeledColumn.

:methods:
    * **__str__**
        Returns a pretty printed string version of the object.
    * **_repr_html_**
        Returns a html table in ipython online session.

**Examples**

>>>  words = ['there','will','be','an','answer']
>>>  values = [random.random() for w in words]
>>>  arr = np.array(zip(words, values), 
        dtype=[('i', np.array(words).dtype), 
        ('value', np.array(values).dtype)])
>>>  lc = LabeledColumn(arr)
>>>  lc.col_header = 'Words'
>>>  lc.subcol_headers = ['Word', 'Value']
>>>  lc.subcol_widths
[11, 10]
>>>  lc.col_len
5
>>> print lc
Words        
---------------------
Word       Value     
---------------------
there      0.22608   
will       0.64567   
be         0.02832   
an         0.31118   
answer     0.23083   

Documentación de las funciones miembro

def vsm.viewer.labeleddata.LabeledColumn.__array_finalize__ (   self,
  obj 
)
 
def vsm.viewer.labeleddata.LabeledColumn.__new__ (   cls,
  input_array,
  col_header = None,
  subcol_headers = None,
  subcol_widths = None,
  col_len = None,
  col_num = None,
  multi_col = True 
)
 
def vsm.viewer.labeleddata.LabeledColumn.__str__ (   self)
Pretty prints the LabeledColumn when 'print' method is used.

La documentación para esta clase fue generada a partir del siguiente fichero: