parameters: (tp, fp, p)
return_statement: return numerator, denominator
docstring: Calculate fm.
docstring_summary: Calculate fm.
docstring_tokens: Calculate fm .
function: def _calculate_fm(tp, fp, p):
      """Calculate fm."""
      tpr = np.where(p > 0, tp / p, np.array(float("nan")))
      ppv = np.where((tp + fp) > 0, tp / (tp + fp), np.array(float("nan")))
      numerator = np.sqrt(ppv * tpr)
      denominator = 1.0
  
      return numerator, denominator
function_tokens: def _calculate_fm ( tp , fp , p ) : tpr = np . where ( p > 0 , tp / p , np . array ( float ( "nan" ) ) ) ppv = np . where ( ( tp + fp ) > 0 , tp / ( tp + fp ) , np . array ( float ( "nan" ) ) ) numerator = np . sqrt ( ppv * tpr ) denominator = 1.0 return numerator , denominator