lib/matplotlib/mlab.py
def demean(x, axis=0):
    "Return x minus its mean along the specified axis"
    x = np.asarray(x)
    if axis == 0 or axis is None or x.ndim <= 1:
        return x - x.mean(axis)
    ind = [slice(None)] * x.ndim
    ind[axis] = np.newaxis
    return x - x.mean(axis)[ind]
Return x minus its mean along the specified axis
Return x minus its mean along the specified axis
Return x minus its mean along the specified axis
def demean(x, axis=0):
    x = np.asarray(x)
    if axis == 0 or axis is None or x.ndim <= 1:
        return x - x.mean(axis)
    ind = [slice(None)] * x.ndim
    ind[axis] = np.newaxis
    return x - x.mean(axis)[ind]
def demean ( x , axis = 0 ) : x = np . asarray ( x ) if axis == 0 or axis is None or x . ndim <= 1 : return x - x . mean ( axis ) ind = [ slice ( None ) ] * x . ndim ind [ axis ] = np . newaxis return x - x . mean ( axis ) [ ind ]
Return x minus its mean along the specified axis
Return x minus its mean along the specified axis
"Return x minus its mean along the specified axis"
x
axis