Converting points including their attributes into numpy arrays. More...

Public Member Functions

def asNumpyDict
 translates a point index leaf to an dictionary numpy object with points/attributes
def fillNumpyDict
 fill an dictionary object with points/attributes of an point index leaf and at the specified row index

Static Public Member Functions

def asNumpyDict
 translates a point index leaf to an dictionary numpy object with points/attributes
def compareWithNumpyArray
 integral comparison of a specific attribute columns with a given numpy array
def createNumpyDict
 Creates a python dictionary mapping columns labels (x,y,z or attribute name) to correctly sized column numpy arrays.
def fillNumpyDict
 fill an dictionary object with points/attributes of an point index leaf and at the specified row index
def setFromNumpyDict
 set attributes of a point index leaf object from a numpy dictionary

Detailed Description

Converting points including their attributes into numpy arrays.

Member Function Documentation

def asNumpyDict (   leaf,
  layout,
  withCoordinates = True,
  filter = None 
)
static

translates a point index leaf to an dictionary numpy object with points/attributes

Parameters
[in]leafpoint index leaf that should be converter
[in]layoutdefines the attributes that should be transferred
[in]withCoordinatesflag if numpy arrays for coordinates are desired
[in]filteroptional filter to subselect the points
Returns
filled dictionary object

Referenced by NumpyConverter.asNumpyDict().

def asNumpyDict (   leaf,
  layout,
  mapCol,
  map,
  helper,
  invert,
  withCoordinates = True,
  filter = None 
)

translates a point index leaf to an dictionary numpy object with points/attributes

Parameters
[in]leafpoint index leaf that should be converter
[in]layoutdefines the attributes that should be transferred
[in]mapColattribute (single column layout) for accessing the relevant map index
[in]mapindex map object describing the object indices for selection
[in]helperindex helper object for keeping track of traversed map index (can be empty. the object is extended automatically)
[in]invertif false all objects listed by the index map are inserted to the numpy dict. Otherwise all objects that are NOT listed are inserted.
[in]withCoordinatesflag if numpy arrays for coordinates are desired
[in]filteroptional filter to subselect the points
Returns
filled dictionary object

References NumpyConverter.asNumpyDict().

def compareWithNumpyArray (   obj,
  translator,
  leaf,
  classMatrix,
  mapCol,
  map,
  helper,
  invert,
  filter = None 
)
static

integral comparison of a specific attribute columns with a given numpy array

The results are stored in a class comparison matrix

Parameters
[in]objnumpy array
[in]translatorpython dictionary for translating input values (can be empty)
[in]leafpoint index leaf that should be converter
[in]classMatrixclassification matrix storing cross validation
[in]mapColattribute (single column layout) for accessing the relevant map index
[in]mapindex map object describing the object indices for selection
[in]helperindex helper object for keeping track of traversed map index (can be empty. the object is extended automatically)
[in]invertif false all objects listed by the index map are inserted to the numpy dict. Otherwise all objects that are NOT listed are inserted.
[in]filteroptional filter to subselect the points
def createNumpyDict (   rowCount,
  layout,
  withCoordinates = True 
)
static

Creates a python dictionary mapping columns labels (x,y,z or attribute name) to correctly sized column numpy arrays.

Parameters
[in]rowCountsize of column numpy arrays
[in]layoutdefines the attributes that should be transferred
[in]withCoordinatesflag if numpy arrays for coordinates are desired
Returns
python dictionary object
def fillNumpyDict (   obj,
  rowIdx,
  leaf,
  filter = None 
)
static

fill an dictionary object with points/attributes of an point index leaf and at the specified row index

Precondition: the provided dictionary object was create using createNumpyDict

Parameters
objdictionary object to be filled
[in]rowIdxat which row index the data should be filled
[in]leafpoint index leaf for filling
[in]filteroptional filter to subselect the points
Returns
number rows that have been filled

Referenced by NumpyConverter.fillNumpyDict().

def fillNumpyDict (   obj,
  rowIdx,
  mapCol,
  map,
  helper,
  invert,
  leaf,
  filter = None 
)

fill an dictionary object with points/attributes of an point index leaf and at the specified row index

Precondition: the provided dictionary object was create using createNumpyDict

Parameters
objdictionary object to be filled
[in]rowIdxat which row index the data should be filled
[in]mapColattribute (single column layout) for accessing the relevant map index
[in]mapindex map object describing the object indices for selection
[in]helperindex helper object for keeping track of traversed map index (can be empty. the object is extended automatically)
[in]invertif false all objects listed by the index map are inserted to the dataframe. Otherwise all objects that are NOT listed are inserted.
[in]leafpoint index leaf for filling
[in]filteroptional filter to subselect the points
Returns
number rows that have been filled

References NumpyConverter.fillNumpyDict().

def setFromNumpyDict (   obj,
  translators,
  leaf,
  layout,
  filter = None 
)
static

set attributes of a point index leaf object from a numpy dictionary

The optional translator objects can be used to map input values to 'translated' values. If a values is not specified in the corresponding dictionary object, this value will be treated as null. Since the functionality allows setting multiple attributes at once, an empty list (which disables the translator functionality) or a list containing the same number of dictionary objects as provided by the data object and the layout columns. The function uses the layout column order for selection the correct translator object.

Parameters
[in]objpython dictionary of numpy column arrays
[in]translatorslist of python dictionary for translating input values (can be empty)
[in]leafpoint index leaf that should be converter
[in]layoutdefines the attributes that should be transferred
[in]filteroptional filter to subselect the points
Returns
filled dictionary object