### 6.5.3. LookUpTableBase

`class compolyx.LookUpTableBase`(obj, parent=None)

Bases: compolyx.graph_interface.NamedGraphFuncObject

Look-Up Table Class

associates scalar or vector values to points

Example:

    >>> table = db.models['class40.1'].create_lookup_table1d(name='LookUpTable1D.1')
    >>> table.columns['Location'].values = [0,1,2,3]
    >>> db.models['class40.1'].lookup_tables['LookUpTable1D.2'].create_column( name='Radius', type='scalar' )
    >>> r = db.models['class40.1'].lookup_tables['LookUpTable1D.2'].columns['Radius']
    >>> r.values = [0,0.3,0.6,1]

`active`

  LookUpTable active

`clear`()

  clear table data (rows and columns)

`clear_rows`()

  clear table rows (keep columns)

`column_types`

  a list of column types ('scalar', or 'direction')

`columns`

  Dictionary with all columns

`create_column`(name, type=None, values=None, dimension='dimensionless')

  create a new column,

  Parameters

`empty`

  True if table is empty

`load_from_csv_file`(path)

  load the table from csv file in path Load LookUpTable from CSV file :Parameters:

  - path: path to output file

`num_cols`

  Number of rows

`num_rows`

  Number of columns

`save_to_csv_file`(path)

  save the table as csv file in path Save LookUpTable to CSV file :Parameters:

  - path: path to output file

`tabular_data`

  a tuple containing a list of column labels and a 2d array with floats for all cells. This is a flattened view of all columns.

Release 18.2 - © ANSYS, Inc. All rights reserved.