def asquare_of_sums(inarray, dimension=None, keepdims=0):
    if dimension == None:
        inarray = N.ravel(inarray)
        dimension = 0
    s = asum(inarray,dimension,keepdims)
    if type(s) == N.ndarray:
        return s.astype(N.float_)*s
    else:
        return float(s)*s
Turn the given IP string into an integer for comparison.
dataset/ETHPy150Open radlab/sparrow/src/main/python/third_party/stats.py/asquare_of_sums--crossover with--dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/ipaddress.py/_BaseV4._ip_int_from_string