Features.getIndex

Features.getIndex(identifier)

The index of a feature.

Return the index location of the feature identifier. The identifier can be a feature name or integer (including negative integers).

Parameters:

name (str) – The name of a feature.

Returns:

int

See also

getIndices

Examples

>>> X = nimble.identity(4, featureNames=['a', 'b', 'c', 'd'])
>>> X.features.getIndex('c')
2
>>> X.features.getIndex(-1)
3

Keywords: position, spot, location, identifier