Features.matching¶
- Features.matching(function, *, useLog=None)¶
- Identifying features matching the given criteria. - Return a boolean value object by apply a function returning a boolean value for each feature in this object. Common any/all matching functions can be found in nimble’s match module. Note that the pointName in the returned object will be set to the - __name__attribute of- functionunless it is a- lambdafunction.- Parameters:
- function (function) – - function - in the form of function(featureView) which returns True, False, 0 or 1. 
- query - string in the format ‘POINTNAME OPERATOR VALUE’ (i.e “pt1 < 10”, “id4 == yes”, or “row4 is nonZero”) where OPERATOR is separated from the POINTNAME and VALUE by whitespace characters. See - nimble.match.QueryStringfor string requirements.
 
- Returns:
- nimble Base object – A point vector of boolean values. 
 - See also - Examples - >>> from nimble import match >>> lst = [[1, -1, 1], [-3, 3, 3]] >>> X = nimble.data(lst) >>> allPositiveFts = X.features.matching(match.allPositive) >>> allPositiveFts <Matrix 1pt x 3ft 0 1 2 ┌─────────────────── allPositive │ False False True > - >>> from nimble import match >>> lst = [[1, float('nan'), 1], [-3, 3, 3]] >>> X = nimble.data(lst) >>> ftHasMissing = X.features.matching(match.anyMissing) >>> ftHasMissing <Matrix 1pt x 3ft 0 1 2 ┌─────────────────── anyMissing │ False True False > - Keywords: boolean, equivalent, identical, same, matches, equals, compare, comparison, same, filter