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
|
static |
translates a point index leaf to an dictionary numpy object with points/attributes
- Parameters
-
[in] leaf point index leaf that should be converter [in] layout defines the attributes that should be transferred [in] withCoordinates flag if numpy arrays for coordinates are desired [in] filter optional 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] leaf point index leaf that should be converter [in] layout defines the attributes that should be transferred [in] mapCol attribute (single column layout) for accessing the relevant map index [in] map index map object describing the object indices for selection [in] helper index helper object for keeping track of traversed map index (can be empty. the object is extended automatically) [in] invert if false all objects listed by the index map are inserted to the numpy dict. Otherwise all objects that are NOT listed are inserted. [in] withCoordinates flag if numpy arrays for coordinates are desired [in] filter optional filter to subselect the points
- Returns
- filled dictionary object
References NumpyConverter.asNumpyDict().
|
static |
integral comparison of a specific attribute columns with a given numpy array
The results are stored in a class comparison matrix
- Parameters
-
[in] obj numpy array [in] translator python dictionary for translating input values (can be empty) [in] leaf point index leaf that should be converter [in] classMatrix classification matrix storing cross validation [in] mapCol attribute (single column layout) for accessing the relevant map index [in] map index map object describing the object indices for selection [in] helper index helper object for keeping track of traversed map index (can be empty. the object is extended automatically) [in] invert if false all objects listed by the index map are inserted to the numpy dict. Otherwise all objects that are NOT listed are inserted. [in] filter optional filter to subselect the points
|
static |
Creates a python dictionary mapping columns labels (x,y,z or attribute name) to correctly sized column numpy arrays.
- Parameters
-
[in] rowCount size of column numpy arrays [in] layout defines the attributes that should be transferred [in] withCoordinates flag if numpy arrays for coordinates are desired
- Returns
- python dictionary object
|
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
-
obj dictionary object to be filled [in] rowIdx at which row index the data should be filled [in] leaf point index leaf for filling [in] filter optional 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
-
obj dictionary object to be filled [in] rowIdx at which row index the data should be filled [in] mapCol attribute (single column layout) for accessing the relevant map index [in] map index map object describing the object indices for selection [in] helper index helper object for keeping track of traversed map index (can be empty. the object is extended automatically) [in] invert if false all objects listed by the index map are inserted to the dataframe. Otherwise all objects that are NOT listed are inserted. [in] leaf point index leaf for filling [in] filter optional filter to subselect the points
- Returns
- number rows that have been filled
References NumpyConverter.fillNumpyDict().
|
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] obj python dictionary of numpy column arrays [in] translators list of python dictionary for translating input values (can be empty) [in] leaf point index leaf that should be converter [in] layout defines the attributes that should be transferred [in] filter optional filter to subselect the points
- Returns
- filled dictionary object
