def minmax_scale(X, feature_range=(0, 1), axis=0, copy=True):
 X = check_array(X, copy=False, ensure_2d=False, warn_on_dtype=True, dtype=FLOAT_DTYPES)
 original_ndim = X.ndim
 if (original_ndim == 1):
  X = X.reshape(X.shape[0], 1)
 s = MinMaxScaler(feature_range=feature_range, copy=copy)
 if (axis == 0):
  X = s.fit_transform(X)
 else:
  X = s.fit_transform(X.T).T
 if (original_ndim == 1):
  X = X.ravel()
 return X

def minmax_scale ( X , feature_range = ( 0 , 1 ) , axis = 0 , copy = True ) : X = check_array ( X , copy = False , ensure_2d = False , warn_on_dtype = True , dtype = FLOAT_DTYPES ) original_ndim = X . ndim if ( original_ndim == 1 ) : X = X . reshape ( X . shape [ 0 ] , 1 ) s = MinMaxScaler ( feature_range = feature_range , copy = copy ) if ( axis == 0 ) : X = s . fit_transform ( X ) else : X = s . fit_transform ( X . T ) . T if ( original_ndim == 1 ) : X = X . ravel ( ) return X
transforms features by scaling each feature to a given range .