parameters: (values)
return_statement: return retVal
docstring: Computes standard deviation of a list of numbers.
      Reference: http://www.goldb.org/corestats.html
  
      >>> stdev([0.9, 0.9, 0.9, 1.0, 0.8, 0.9])
      0.06324555320336757
docstring_summary: Computes standard deviation of a list of numbers.
      Reference: http://www.goldb.org/corestats.html
docstring_tokens: Computes standard deviation of a list of numbers . Reference : http : // www . goldb . org / corestats . html
function: def stdev(values):
      """
      Computes standard deviation of a list of numbers.
      Reference: http://www.goldb.org/corestats.html
  
      >>> stdev([0.9, 0.9, 0.9, 1.0, 0.8, 0.9])
      0.06324555320336757
      """
  
      if not values or len(values) < 2:
          return None
  
      key = (values[0], values[-1], len(values))
  
      if kb.get("cache") and key in kb.cache.stdev:
          retVal = kb.cache.stdev[key]
      else:
          avg = average(values)
          _ = reduce(lambda x, y: x + pow((y or 0) - avg, 2), values, 0.0)
          retVal = sqrt(_ / (len(values) - 1))
          if kb.get("cache"):
              kb.cache.stdev[key] = retVal
  
      return retVal
function_tokens: def stdev ( values ) : if not values or len ( values ) < 2 : return None key = ( values [ 0 ] , values [ - 1 ] , len ( values ) ) if kb . get ( "cache" ) and key in kb . cache . stdev : retVal = kb . cache . stdev [ key ] else : avg = average ( values ) _ = reduce ( lambda x , y : x + pow ( ( y or 0 ) - avg , 2 ) , values , 0.0 ) retVal = sqrt ( _ / ( len ( values ) - 1 ) ) if kb . get ( "cache" ) : kb . cache . stdev [ key ] = retVal return retVal