human
Complete this python program:
def getRMS(data):
assistant
#Here is the Python program you requested.

    """Compute and return the audio power ("loudness").
    Uses numpy.std() as RMS. std() is same as RMS if the mean is 0,
    and .wav data should have a mean of 0.
    Returns an array if given stereo data (RMS computed within-channel).
    `data` can be an array (1D, 2D) or filename; .wav format only.
    data from .wav files will be normalized to -1..+1 before RMS is computed.
    """
    def _rms(data):
        'Audio    loudness    /    power,    as    rms;    ~2x    faster    than    std()\n                                '
        if (len(data.shape) > 1):
            return np.std(data, axis=1)
        return np.std(data)
    if isinstance(data, basestring):
        if (not os.path.isfile(data)):
            raise ValueError(('getRMS:    could    not    find    file    %s' % data))
        (_junk, data) = wavfile.read(data)
        data_tr = np.transpose(data)
        data = (data_tr / 32768.0)
    elif (not isinstance(data, np.ndarray)):
        data = np.array(data).astype(np.float)
    return _rms(data)