Lines Matching refs:inarray
2029 def ageometricmean(inarray, dimension=None, keepdims=0): argument
2042 inarray = N.array(inarray, N.float_)
2044 inarray = N.ravel(inarray)
2045 size = len(inarray)
2046 mult = N.power(inarray, 1.0 / size)
2049 size = inarray.shape[dimension]
2050 mult = N.power(inarray, 1.0 / size)
2053 shp = list(inarray.shape)
2060 size = N.array(N.multiply.reduce(N.take(inarray.shape, dims)), N.float_)
2061 mult = N.power(inarray, 1.0 / size)
2065 shp = list(inarray.shape)
2071 def aharmonicmean(inarray, dimension=None, keepdims=0): argument
2084 inarray = inarray.astype(N.float_)
2086 inarray = N.ravel(inarray)
2087 size = len(inarray)
2088 s = N.add.reduce(1.0 / inarray)
2090 size = float(inarray.shape[dimension])
2091 s = N.add.reduce(1.0 / inarray, dimension)
2093 shp = list(inarray.shape)
2100 for i in range(len(inarray.shape)):
2103 tinarray = N.transpose(inarray, nondims + dims) # put keep-dims first
2106 size = len(N.ravel(inarray))
2107 s = asum(1.0 / inarray)
2109 s = N.reshape([s], N.ones(len(inarray.shape)))
2116 size = N.multiply.reduce(N.take(inarray.shape, dims))
2118 shp = list(inarray.shape)
2124 def amean(inarray, dimension=None, keepdims=0): argument
2137 if inarray.dtype in [N.int_, N.short, N.ubyte]:
2138 inarray = inarray.astype(N.float_)
2140 inarray = N.ravel(inarray)
2141 sum = N.add.reduce(inarray)
2142 denom = float(len(inarray))
2144 sum = asum(inarray, dimension)
2145 denom = float(inarray.shape[dimension])
2147 shp = list(inarray.shape)
2154 sum = inarray * 1.0
2157 denom = N.array(N.multiply.reduce(N.take(inarray.shape, dims)), N.float_)
2159 shp = list(inarray.shape)
2165 def amedian(inarray, numbins=1000): argument
2176 inarray = N.ravel(inarray)
2177 (hist, smallest, binsize, extras) = ahistogram(inarray, numbins,
2178 [min(inarray), max(inarray)])
2180 otherbins = N.greater_equal(cumhist, len(inarray) / 2.0)
2187 (len(inarray) / 2.0 - cfbelow) / float(freq)) * binsize # MEDIAN
2190 def amedianscore(inarray, dimension=None): argument
2201 inarray = N.ravel(inarray)
2203 inarray = N.sort(inarray, dimension)
2204 if inarray.shape[dimension] % 2 == 0: # if even number of elements
2205 indx = inarray.shape[dimension] / 2 # integer division correct
2206 median = N.asarray(inarray[indx] + inarray[indx - 1]) / 2.0
2208 indx = inarray.shape[dimension] / 2 # integer division correct
2209 median = N.take(inarray, [indx], dimension)
2479 def adescribe(inarray, dimension=None): argument
2489 inarray = N.ravel(inarray)
2491 n = inarray.shape[dimension]
2492 mm = (N.minimum.reduce(inarray), N.maximum.reduce(inarray))
2493 m = amean(inarray, dimension)
2494 sd = astdev(inarray, dimension)
2495 skew = askew(inarray, dimension)
2496 kurt = akurtosis(inarray, dimension)
2601 def ascoreatpercentile(inarray, percent): argument
2607 targetcf = percent * len(inarray)
2608 h, lrl, binsize, extras = histogram(inarray)
2617 def apercentileofscore(inarray, score, histbins=10, defaultlimits=None): argument
2625 h, lrl, binsize, extras = histogram(inarray, histbins, defaultlimits)
2629 h[i]) / float(len(inarray)) * 100
2632 def ahistogram(inarray, numbins=10, defaultlimits=None, printextras=1): argument
2644 inarray = N.ravel(inarray) # flatten any >1D arrays
2650 Min = N.minimum.reduce(inarray)
2651 Max = N.maximum.reduce(inarray)
2657 for num in inarray:
2737 def asamplevar(inarray, dimension=None, keepdims=0): argument
2748 inarray = N.ravel(inarray)
2751 mn = amean(inarray, dimension)[:, N.NewAxis]
2753 mn = amean(inarray, dimension, keepdims=1)
2754 deviations = inarray - mn
2758 n = n * inarray.shape[d]
2760 n = inarray.shape[dimension]
2764 def asamplestdev(inarray, dimension=None, keepdims=0): argument
2774 return N.sqrt(asamplevar(inarray, dimension, keepdims))
2817 def avar(inarray, dimension=None, keepdims=0): argument
2828 inarray = N.ravel(inarray)
2830 mn = amean(inarray, dimension, 1)
2831 deviations = inarray - mn
2835 n = n * inarray.shape[d]
2837 n = inarray.shape[dimension]
2841 def astdev(inarray, dimension=None, keepdims=0): argument
2851 return N.sqrt(avar(inarray, dimension, keepdims))
2853 def asterr(inarray, dimension=None, keepdims=0): argument
2864 inarray = N.ravel(inarray)
2866 return astdev(inarray, dimension,
2867 keepdims) / float(N.sqrt(inarray.shape[dimension]))
2869 def asem(inarray, dimension=None, keepdims=0): argument
2880 inarray = N.ravel(inarray)
2885 n = n * inarray.shape[d]
2887 n = inarray.shape[dimension]
2888 s = asamplestdev(inarray, dimension, keepdims) / N.sqrt(n - 1)
4226 def ass(inarray, dimension=None, keepdims=0): argument
4239 inarray = N.ravel(inarray)
4241 return asum(inarray * inarray, dimension, keepdims)
4259 def asquare_of_sums(inarray, dimension=None, keepdims=0): argument
4271 inarray = N.ravel(inarray)
4273 s = asum(inarray, dimension, keepdims)
4291 inarray = N.ravel(a)
4295 def ashellsort(inarray): argument
4302 n = len(inarray)
4303 svec = inarray * 1.0
4320 def arankdata(inarray): argument
4328 n = len(inarray)
4329 svec, ivec = ashellsort(inarray)