def amoment(a,moment=1,dimension=None):
    if dimension == None:
        a = N.ravel(a)
        dimension = 0
    if moment == 1:
        return 0.0
    else:
        mn = amean(a,dimension,1)  # 1=keepdims
        s = N.power((a-mn),moment)
        return amean(s,dimension)
Calculates the nth moment about the mean for a sample (defaults to the
dataset/ETHPy150Open radlab/sparrow/src/main/python/third_party/stats.py/amoment