#NEWLINE# def featurewise_std_normalization( X , std = None ) : #NEWLINE# #INDENT# ' featurewise_std_normalization.\n\n    Scale each sample by the specified standard deviation. If no std\n    specified, std is evaluated over all samples data.\n\n    Arguments:\n        X: `array`. The batch of samples to scale.\n        std: `float`. The std to use for scaling data. If not specified, it\n            will be evaluated over the provided data.\n\n    Returns:\n        A numpy array with same shape as input. Or a tuple (array, std) if no\n        std value was specified.\n\n    ' #NEWLINE# if ( std is None ) : #NEWLINE# #INDENT# std = np . std ( X , axis = 0 ) #NEWLINE# return ( ( X / std ) , std ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( std / std )